468,121 Members | 1,353 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,121 developers. It's quick & easy.

darn window.open problem..shucks....

Hello,

Can someone kindly tell me what is wrong with this code?

A simple page with a link that when clicked uses window.open but when I open
it in IE6 and click on the link I get 'Line 12 Invalid Argument. Line 12 is
the last line.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<a href="testjava.htm" onClick="window.open('freemob.html', 'Free Mobile',
config='height=300,width=300')" target="_self">Click
Here</a>
</body>
</html>

Thanks in advance,

RG.

Jul 20 '05 #1
1 3039
"toedipper" <to*******@pocketpcheaven.com> writes:
A simple page with a link that when clicked uses window.open but when I open
it in IE6 and click on the link I get 'Line 12 Invalid Argument. Line 12 is
the last line.


I get the error on line 8, and the javascript debugger points to the
window.open call (unsurpricingly).

The error is that "Free Mobile" contains a space. The second argument
to the window.open function is the name of the window, not its title.
As a name, it must contain only letters, digits, and underscores, and
must start with a letter (starting with an underscore is reserved for
"_blank" etc.).

Apart from that, the "config=" is irrelevant and can be removed.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Michael | last post: by
13 posts views Thread by Kai Grossjohann | last post: by
4 posts views Thread by Phillip Parr | last post: by
10 posts views Thread by David McCulloch | last post: by
6 posts views Thread by news.versatel.de | last post: by
17 posts views Thread by Applebrownbetty | last post: by
14 posts views Thread by D. Alvarado | last post: by
2 posts views Thread by DonDeCosta | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.