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 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS Error in I.E. 6.02 - No idea why it isn't working

    I have had the worst problem with a file that is throwing a syntax error.

    to view the file go here
    http://www.rafb.net/paste/results/2Mp4ty12.html

    if you run it locally you will not get the error.

    You need to run it through a local webserver (apache or something). The error comes at line 503. I have no idea why it won't execute through this function. Mind you to see how the file works try it in Firefox and it behaves fine. It is just such a weird problem because Firefox is usually stricter when it comes to JS.

    I am desparate and will pay someone to help me figure this out. I have been staring at this code for almost a week.

    Please HELP!!

    thanks,
    Billy

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    I think people will be leery about viewing/downloading the file of a new member. Sorry, but too many bad boys out there.

    Suggest you list the relevant few lines around 503 here, then perhaps someone can help.

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The problem is the file is one that I think needs to viewed in its entirety, but I don't what to post it in the forum to waste space. Any suggestions??

  • #4
    Senior Coder TheShaner's Avatar
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Posts
    1,126
    Thanks
    2
    Thanked 40 Times in 40 Posts
    Let the people around here decide if the code needs to be seen in its entirety or not. Post the lines around 503 and see what people say about it.

    Or even better, paste the line that calls the function that's having a problem and then paste the code for that function.

    Start there and see what people say first.

    -Shane

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Provo, UT
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Did you try opening the file up in Firefox and checking out what the consol says. I have found that if IE is giving me vague errors, i open the page up in Firefox and check the consol and a lot of times it will give me a more accurate error.

    You probably have already done that but I thought I would post it anyway.

    Good luck.

    By The Way, I clicked to his page and nothing blew up on my computer.
    I try to convince 'em that I am computer geek, but I just can't do it. Why? Oh why?

  • #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    It is always best to test code in Firefox and/or Opera first and get it working properly there. Then you can try it on IE and make the necessary changes to support it on that antique browser.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #7
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That is just the problem, it workd fine in Firefox, I have opened the Console and get no error!! Of course this is made for an intranet where the only browser allowed is IE 6.......ugggghhhhhh.

    Ok here is the code in a nutshell

    Code:
    <tr>
        <td colspan="3">
    <a href="/affiliates_CBSS/weblink_linkto.html" tabindex="139"><img src="images/button_back.gif" border="0" width="43" height="17" alt="Back to Affiliates site"></a>
     <a href="javascript:submitForm(document.uspsfeedback)" tabindex="140"><img src="images/submit.jpg" name="web_app" border="0" ALT="Submit the Web Linking Application Form"></a>  		
    </form>
    </td>
    </tr>
    this is the submit which goes to

    Code:
      
     function submitForm(frm) {
     
    	if (TestDataCheck(frm)) {
     
    		 frm.submit();	// this is where the error is thrown
    	}
     }
    it won't execute past frm.submit(); I put an alert before it and it works fine, and after this line, it throws the error

  • #8
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Can you post the error message thrown? If js error notification is turned off, double-click the exclamation icon in the status bar to see the exact error message.

    I'm guessing you have a HTML control named submit and javascript refers to that control and not to the submit() method of the Form object.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #9
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The error message thrown is just a simple syntax error. By HTML control I am not sure what you mean. I have a image button named submit_1 and it calls the function submitForm which is referenced in my code in the above post.

  • #10
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    It's better if you just change your implementation to this:
    Code:
    <form onsubmit="return TestDataCheck(this)">
    ...
    <input type="image" src="images/submit.jpg" name="web_app" border="0" alt="Submit the Web Linking Application Form" />
    ...
    </form>
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

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