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 12 of 12
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post

    JavaScript error?

    Hello

    I am getting a 'Stack overflow at line: 94' error message from one particular Web site. It only seems to happen when I browse to one particular Web page. Is that likely to be a JS script error and how would I troubleshoot it, please?

    Thanks

    Steve

  • #2
    New Coder
    Join Date
    Mar 2012
    Posts
    15
    Thanks
    0
    Thanked 1 Time in 1 Post
    Which website?

  • #3
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello Chris

    Thanks for your reply.

    The site is here:

    http://www.proofreading4students.com/default.asp

    If you log in, the error message appears. There is also a yellow exclamation error in the bottom left hand corner which refers to this line:

    Code:
    // build selection box
    in the file 'message.asp'.

    Thanks.

  • #4
    New Coder
    Join Date
    Mar 2012
    Posts
    15
    Thanks
    0
    Thanked 1 Time in 1 Post
    I just entered the chat with the username "Chris" and said hello. And everything has worked for me.

    What browser are you using?

  • #5
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello Chris

    I am using IE8. I have just tried it with Safari and it seems OK. Best to reinstall IE8 do you think?

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,200
    Thanks
    75
    Thanked 4,342 Times in 4,308 Posts
    I don't get the error with MSIE 9.

    There is also a yellow exclamation error in the bottom left hand corner which refers to this line:

    // build selection box
    No, that is not true.

    The line number you see in the error box is the line number in the HTML code, *NOT* in the ASP code.

    To find which line it *really* refers to, you should use the MS Script Debugger or, if you want a quick answer, click on the VIEW menu and then on the SOURCE menu item. That will show you the HTML. Now find that line number in the HTML instead of the ASP code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #7
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,200
    Thanks
    75
    Thanked 4,342 Times in 4,308 Posts
    And I doubt that reloading MSIE 8 will fix anything. I'd bet it is something in your JS code that is not supported by MSIE 8 that is causing it. If you intend the page to work in all browsers, you need to track it down. See above.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #8
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello

    I am still getting the 'stack overflow error' in IE8 (but not Chrome or Safari), but regarding the yellow exclamation mark, there are two errors:

    Message: Syntax error
    Line: 206
    Char: 17
    Code: 0
    URI: http://www.proofreading4students.com/message.asp
    Line 206 is this:
    Code:
    <p style="font-family: Verdana, Tahoma, Arial; font-size: 11px;">You are no longer logged on. Thank you for your 
    visit.</p>
    and the second error is this:
    Message: Object expected
    Line: 217
    Char: 1
    Code: 0
    URI: http://www.proofreading4students.com/message.asp
    Line 217 refers to:
    Code:
    <body onload="init()" class=message>
    I am not sure how accurate these 'errors' are, since they do not appear in Chrome or Safari.

    Maybe it's best if I attempt to resolve the 'stack overflow error' first, and then go back to those two scripting errors (if they still occur).

    Steve

  • #9
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,200
    Thanks
    75
    Thanked 4,342 Times in 4,308 Posts
    MSIE IS RIGHT!!

    *LOOK* at that code:
    Code:
    function onLoggedOff() {
             <p style="font-family: Verdana, Tahoma, Arial; font-size: 11px;">You are no longer logged on. Thank you for your visit.</p>
    	parent.location.replace('default.asp');
    }
    YOU CAN NOT just dump HTML code smack in the middle of a JS function!

    What in the world do you/did you think that was supposed to do?

    And FF shows the same code. Why it doesn't report an error there is a mystery to me. It should.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #10
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello

    I have managed to get rid of the 'stack overflow' error and the yellow exclamation mark, using the original
    Code:
    function onLoggedOff() {
    			alert('<%= getMsg("logout.no_longer_on") %>');
    			parent.location.replace('<%= LOGGED_OUT_PAGE %>');
    		}
    Unfortunately, I have lost the font formatting that I had.

    In IE8 I still have a yellow exclamation mark in the 'logout.asp' file:
    Code:
    if (opener.closed == false) {
    (but I don't get this in Safari), though in both browsers the control.asp file is showing
    Code:
    document.location.replace('expired.asp');
    on screen.

    Thanks for reading!

  • #11
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,200
    Thanks
    75
    Thanked 4,342 Times in 4,308 Posts
    alert() does NOT allow any formatting. Period.

    You would need to use a POPON <div> or similar to show formatted messages in the style of alerts. I suspect that is is something you aren't ready to attempt yet, so I'd leave it as an alert() until you get the other problems ironed out.

    Yellow exclamation marks are fine, but they don't say *WHAT* the error is. Learn to use the developer tools in IE8 to find out what the actual error is.

    And learn to use a JavaScript debugger on *ALL* the platforms you expect to support. It's the only reasonable way to figure out JS errors, really.

    And remember: It doesn't matter what the ASP file shows. If it's a JavaScript error, you need to find and debug the error IN THE BROWSER. Looking at the HTML, not at the ASP code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #12
    Regular Coder
    Join Date
    Nov 2005
    Posts
    750
    Thanks
    138
    Thanked 1 Time in 1 Post
    Hello Old Pedant

    Thanks for that.

    And remember: It doesn't matter what the ASP file shows. If it's a JavaScript error, you need to find and debug the error IN THE BROWSER. Looking at the HTML, not at the ASP code.
    Yes, I have been doing that today: thanks again for the advice.

    Steve


  •  

    Posting Permissions

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