Window args and errors
What's wrong with this picture?
window.open("example.html","Example Window", "scrollbars=no");
Moz/Firefox will pop open a new window, but IE6 will throw an "Invalid Argument" error. Why?
The second argument to window.open
is the name of the window. In IE6, this cannot contain any spaces or special characters. Some people mistakenly think this argument is for the title of the window. So they put in something human-readable (like "Example Window"), thus the error.
11 Comments:
Thank you so much for this little article. I was struggling with why my function would pop a window in Firefox and not in IE. I really appreciate you taking a moment to share this little tid-bit of info.
I liked you Blog so much,so i also wanted to show you some good resourses on the net.
Learn to earn 90000$/Month
For which you may also see my Personal Website
Here.
and for a Personal Education Career Tools
free Study Database.
This site is for seeing the
Hifi Electronics.
And this is for
World Class Gadgets
Thank you. You saved our time when customer changed source code of page and then asked us to fix the trouble with popup. Without your post we would spend much more time.
Man, I love it when I type in my obscure problem in Google and a site pops up right away with the answer. Great job! I loved reading the rest of your blog as well!
Thanks for this, I've spent a lot of the afternoon getting mad at IE for not popping up my window, now I feel stupid ...
Cheers
I feel stupid also, hehe.
Thanks a lot for this, it was driving me crazy!
thx for saving the rest of the day...
&
IE sucks!
Thank you .. this problem wasted one complete day of mine
Thanks for your post which helped
Thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you
This has been doing my nut in.
Thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you.
This prob has been doing my nut in!
thank you, spent 2hours trying to get it working. thanks for the tid bit of knowledge.
Post a Comment
<< Home