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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • toedipper

    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="Micros oft FrontPage 4.0">
    <meta name="ProgId" content="FrontP age.Editor.Docu ment">
    <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.





  • Lasse Reichstein Nielsen

    #2
    Re: darn window.open problem..shucks ....

    "toedipper" <toedipper@pock etpcheaven.com> writes:
    [color=blue]
    > 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.[/color]

    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 - lrn@hotpop.com
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    Working...