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

T

toedipper

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.
 
L

Lasse Reichstein Nielsen

toedipper said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top