Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2003
    Location
    Richmond, Va
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onClick not opening new window.

    Hi All,

    I have this bit of code and I keep getting an error for som reason.
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <form>
    <input type="button" value="Help" onClick="open.window('c:Queryhelp.htm')">
    </form>
    </body>
    </html>

    The error I keep getting is: Object doesn't supportthis propertyor method.

    All I want to do is have the code open a help page in another window. I am trying to use the example from here http://javascriptkit.com/window.htm

    It all just seems to simple so needless to say I am missing something quite obvious.

    Thank you...Howard

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    its window.open not open.window, and plus i dont know where the .htm file that its trying to open is but i can tell u it wont open that way, u need a relative path, u should prolly move that file into the same folder that u have the page that has the button on it that is supposed to open it
    Code:
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <form>
    <input type="button" value="Help" onClick="window.open('Queryhelp.htm')">
    </form>
    </body>
    </html>

  • #3
    New Coder
    Join Date
    Sep 2003
    Location
    Richmond, Va
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem Solved!!!

    Thank you so much

    It just always amazes me how many times I can stare at code and look through it, instead of at it. Using the correct syntax is always a plus.

    thank you again for the second look for me....Howard


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •