PDA

View Full Version : Browser Problem



Webiter
08-26-2011, 08:44 PM
I have the following image hyperlinked to call a popup window playing a VeriSign video. It works fine in Chrome, Safari and Firefox. It will not do the business in IE, yet all other javascripts work there. Link at http://www.webitry.net/ShopThankU.html


<a href="javascript:veripop()"><img style="border:0;width:137px;height:46px" src="album/verisign.jpg" alt="Verisign Trusted Link" /></a>

Is there anything that can be done to make the thing work in IE?:mad:

coothead
08-26-2011, 09:05 PM
Hi there Webiter,

IE chokes on spaces in the windowName. :eek:
So instead of...

window.open('verisign.html','Verisign Video','scrollbars=1,statusbar=0,resizable=0,width=450,height=365,left=450,top=200');}

...use...

window.open('verisign.html','Verisign_Video','scrollbars=1,statusbar=0,resizable=0,width=450,height=365,left=450,top=200');}

...or...

window.open('verisign.html','VerisignVideo','scrollbars=1,statusbar=0,resizable=0,width=450,height=365,left=450,top=200');}

coothead

Minos
08-26-2011, 10:27 PM
Is that it? I was thinking it was the location of the url that threw IE off.

That using "verisign.html" instead of "../verisign.html" caused it to look in the my_js folder rather than the root directory.

Perhaps it's just an old habit.

traq
08-27-2011, 01:15 AM
Is that it? I was thinking it was the location of the url that threw IE off.

That using "verisign.html" instead of "../verisign.html" caused it to look in the my_js folder rather than the root directory.

relative urls in html (or javascript, regardless of the saved location of the script) will be resolved relative to the user's current location. (it's CSS urls that are parsed relative to the saved location of the stylesheet.)

jscheuer1
08-27-2011, 02:58 AM
After a bit of testing, some head scratching, and more testing - it appears that the word 'video' (and it appears 'vid' as well) is/are somehow reserved or otherwise off limits in IE less than 9, at least when used as a window name/target for the window.open() method as it is in the function veripop() - from webitry.net/my_js/veripop.js:


function veripop() {window.open('verisign.html','video','scrollbars=1,statusbar=0,resizable=0,width=450,height=365,left=450,top=200');}

You can do:


function veripop() {window.open('verisign.html','bob','scrollbars=1,statusbar=0,resizable=0,width=450,height=365,left=450,top=200');}

And that should be fine in IE and others.