Adding SCript Node into Popup Window

D

Doug

Hello,
I create a popup window using
document.createPopup()

Is there anyway to add a script node into this popup? For example I'd
like to add
<script type="text/javascript" src="blah.js"></script>

into the new popup window.

Thank you.
 
S

shimmyshack

Doug said:
Hello,
I create a popup window using
document.createPopup()

Is there anyway to add a script node into this popup? For example I'd
like to add
<script type="text/javascript" src="blah.js"></script>

into the new popup window.

Thank you.

var t = 'title';
var url= 'http://www.google.co.uk/ig?hl=en';
var p = 'http://www.google.com/images/logo_sm.gif';
var popupwindow = document.createPopup();

var newContent = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01
Transitional//EN\"><html><head><title>"+t+"</title><meta
http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-1\"><script type=\"text/javascript\"
src=\"blah.js\"></script></head><body topmargin=\"0\" leftmargin=\"0\"
bottommargin=\"0\" onLoad=\"window.focus();\"><a
href=\"javascript:window.opener.focus();\"><img border=\"0\"
src=\""+p+"\" alt=\"Click on the image to goto
google\"></a></body></html>";

popupwindow.document.write(newContent);
popupwindow.document.close();


the thing is to return a reference to your pop up, and then write to it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top