SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Nov 1999
    Location
    Manhattan!
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Greetings,

    I am getting the following odd JavaScript error: Unterminated string constant, line 78, char 123

    Well, the given line reads:
    <a href='#' onMouseDown="openWindow('picture.php3?fname=sailingDK1.jpg','picture','width=400,height=264,screenX=200,screenY=100,top=100,left=200')">

    and char # 123 is the last 0 (zero) in screenX=200. Now what is up with that?

    The openWindow function looks as follows:
    <script language="JavaScript">
    <!--
    function openWindow(url,name,features) {
    window.open(url,name,features);
    }
    //-->
    </script>

    The code works fine (only tested in IE), but the error message is driving me nuts...

    Any help is greatly appreciated.

    Christian



    ------------------
    Axie automatically performs free, customizable searches for new
    websites and delivers the links to members by personalized email.
    http://www.axie.com/

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try retyping the line from scratch. It's possible that a linefeed character slipped in somehow without a carriage return (or vice versa) and your editor isn't showing it. I had this happen to me once in HotDog Pro, for example.



    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  3. #3
    SitePoint Zealot
    Join Date
    Nov 1999
    Location
    Manhattan!
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I typed the line again -- the same way -- and everything worked like a charm... I really, really dislike those kinds of errors, especially since I spend 5+ hours pulling my hair out when re-writing a TCP test program for a Xkernel project. Turned out my mysterious error was a tab that had been deleted, but left behind an invisible character.

    Thanks.

    Christian.



    ------------------
    Axie automatically performs free, customizable searches for new
    websites and delivers the links to members by personalized email.
    http://www.axie.com/

  4. #4
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Glad that was the problem. I didn't know what else to try if that wasn't it.


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  5. #5
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What text editor are you using???

    Get Textpad from www.textpad.com as it can show invisible characters so you can remove them.

    ------------------
    Wayne Luke - Sitepoint Moderator/Internet Media Developer
    Digital Magician Studios - Making Magic with Web Applications
    wluke@digitalmagician.com


Bookmarks

Posting Permissions

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