[thelist] Popup window and Safari

Joshua Olson joshua at waetech.com
Wed Jan 19 07:42:40 CST 2005


I'm opening a popup window on safari with the intension to populate it's
contents with JS.  When I do so, I see the content for a moment, then safari
loads the parent window's page.  Sample code:

t = 'Popup Window Content';
attributes = '...';
preview_win = window.open('#', 'window_preview', attributes);
win = preview_win.document;
win.open();
win.write('<html><head>');
win.write('<style type="text/css">Some style stuff here...</style>');
win.write('</head><body>');
win.write(t);
win.write('</body></html>');
win.close();

My best guess is that the initial window.open('#'...) is prompting Safari to
change pages even after it clearly displays the content as directed in the
next few lines.  Can anybody shed light on how to avoid this?

FWIW, this technique functions correctly in IE and FireFox.

Thanks in advance,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168 




More information about the thelist mailing list