In article <W%pee.14926$8e4.8338@trnddc09>,
ke*********@verizon.net
enlightened us with...
How can I invoke a popup that is not blocked? I know it can be done because
I have seen it.
My goal is to pop up an image that has a BLACK background color (not white -
otherwise I could just directly link to the picture file).
Modify as desired.
(from my script that opens a help window: tested successfully in MSIE5/6,
Opera 7+, and Gecko/Firefox)
SCRIPT:
var h_window = null;
var h_array = new Array();
/* descriptions that remain constant */
h_array["help"] = "<p>Click on any of the help icons to bring up a javascript
window with relevant information.</p>";
h_array["h_zip"] = "<h1>Zip Code</h1>"+
"<p>Description: The zip code for this office.</p> "+
"<p>Allowable values: 5-digit zip code only, no dashes.
</p>";
/* functions that get called when user presses a help button */
function openHelp(screenName)
{
if (!h_window || h_window == null || typeof h_window == "undefined" ||
h_window.closed || !h_window.document)
h_window = window.open("","Help","height=200,width=
200,scrollbars=yes,resizable=yes");
var doc = h_window.document;
doc.open();
doc.writeln("<html><head><title>Help</title>");
doc.writeln("<link rel='stylesheet' type='text/css'
href='myStylesheet.css'>");
doc.writeln("</head><body>");
doc.writeln(h_array[screenName]);
doc.writeln("</body></html>");
doc.close();
h_window.focus();
return;
}
HTML:
<p> <a href="javascript
:openHelp('help')"><img src="help.gif" border="0"></a>
Click any help icon for more information.</p>
--
--
~kaeli~
When a clock is hungry, it goes back four seconds.
http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace