I am trying to make a bookmarklet that opens a popup window. Inside this window is a list of CSS classes that once selected, highlights that object on window.opener
Indeed the document.ready never fires.. (i don't know why ..)
But you can add your script after the html and remove the document.ready since the document is always loaded at that time ..
function makepopup(){
var popup = '' +
'Test ' +
' ' +
'' +
'' +
'testing popup' +
'' +
'' +
' '+
'' +
'$(":input").click(function(){ alert($(window.opener.doc'+'ument).find("#test").html()) });' +
' ';
var testpopup = window.open( '','test','toolbar=1,location=0,status=0,width=500,height=450,scrollbars=1' );
testpopup.document.write(popup);
return false;
}
This works ..
[UPDATE] BUt the method from Aistina is the correct way to go.