...

View Full Version : window.open working in ff but not ie



Flic
12-04-2006, 05:15 PM
Hi, I have some code which is supposed to open a new window to preset settings, and it does this perfectly in ff but not at all in ie.

The code is:

var settings= ("width=620,height=420,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resiza ble=no");
window.open("map.html", "How to find us", settings);

ie(7) says that the second line is an invalid argument.

I've checked and the page is valid html.

Anyone know why this might be happening?

Thanks, Flic

_Aerospace_Eng_
12-04-2006, 05:17 PM
And it is. Names can't have spaces in them. This line

window.open("map.html", "How to find us", settings);
should be

window.open("map.html", "How_to_find_us", settings);

Flic
12-04-2006, 05:39 PM
And it is. Names can't have spaces in them. This line

window.open("map.html", "How to find us", settings);
should be

window.open("map.html", "How_to_find_us", settings);

Gah! I'm so stupid! Of course! I've come up with this problem before but had forgotten all about it! :o

Thank you!

Any idea why ff let me do it though? It sounds like neither of them should have! :confused:

_Aerospace_Eng_
12-04-2006, 05:44 PM
I guess FF just reads it as a title or something and because its in quotes it reads it as a whole string where as IE reads each word as a seperate string.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum