Hi..
Could someone tell me if the "popup" javascript function i used is compatible with all the internet browsers available like firefox,IE...etc..
plz reply asap...
Thnx
Hi..
Could someone tell me if the "popup" javascript function i used is compatible with all the internet browsers available like firefox,IE...etc..
plz reply asap...
Thnx
Which pop up did you use?
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300,left = 192,top = 144');");
}
Works OK here in IE6 and FF and should be fine in most browsers. If a pop up of this sort is not launched as a direct result of a user's click, it often will be blocked by many browsers though. Here are two link codes I used to launch it:
HTML Code:<a href="javascript:popUp('some.htm')">Link Text</a>Both of the above were not blocked as they require a user's direct click to activate. The second one has the advantage of loading the page in the current window if the user has no javascript available/active. This one:HTML Code:<a href="some.htm" onclick="popUp(this.href);return false;">Link Text</a>
Will launch the content in a regular new window if there is no javascript for the user.HTML Code:<a href="some.htm" target="_blank" onclick="popUp(this.href);return false;">Link Text</a>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks