Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

need a quick bit of help here

Options
  • 06-12-2005 7:41pm
    #1
    Banned (with Prison Access) Posts: 8,486 ✭✭✭


    figured this would be better here than in webmaster forum, the following line of code is throwing up a syntax error on me
    <a href="#" OnClick="window.open('1.html','my_window','width=620, height=435'); onMouseOut="MM_swapImgRestore();"  onMouseOver="MM_swapImage('xx_r9_c16','','images/messages_on.jpg',1);"><img name="xx_r9_c16" src="images/xx_r9_c16.jpg" width="100" height="27" border="0" alt=""></a>
    

    anyone any idea what im missing here?


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    No closing " after onClick.


  • Banned (with Prison Access) Posts: 8,486 ✭✭✭miju


    ah sweet, i really hate debugging :-(

    nice one man, mucho appreciated


  • Registered Users Posts: 19,396 ✭✭✭✭Karoma


    OnClick="window.open('1.html','my_window','width=620, height=435');"
    too slow:)


  • Registered Users Posts: 6,316 ✭✭✭OfflerCrocGod


    Use firefox it can catch these errors. Tools -> Javascript Console and then load up your webpage any errors come up in the console and it's easy to fix :)
    Error: unterminated string literal
    Source File: javascript: OnClick="window.open('1.html','my_window','width=620, height=435');
    Line: 1, Column: 9
    Source Code:
    OnClick="window.open('1.html','my_window','width=620, height=435');
    It's a great help.


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    For better compatibility, I recommend you use:

    [html]<a href="1.html" target="_blank" OnClick="window.open('1.html','my_window','width=620, height=435');return false;">[/html]
    If the client has Javascript enabled, the "return false" stops the window from being opened twice. If the client has Javascript disabled, the window will still open.


  • Advertisement
  • Moderators, Politics Moderators Posts: 39,788 Mod ✭✭✭✭Seth Brundle


    A decent [text] editor should colour code these also!


  • Registered Users Posts: 7,677 ✭✭✭Trampas


    editplus is a free text editor


  • Moderators, Politics Moderators Posts: 39,788 Mod ✭✭✭✭Seth Brundle


    There was a thread here recently on good free text editors and loads were listed.
    Any good editor will have syntax highlighting and should quickly allow the user to spot unterminated strings.


  • Banned (with Prison Access) Posts: 8,486 ✭✭✭miju


    thanks for the help guys, yiz are all legends so yiz are:D


Advertisement