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

09-20-2005, 07:56 PM
I have had the worst problem with a file that is throwing a syntax error.

to view the file go here

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!!


Philip M
09-20-2005, 08:26 PM
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.

09-20-2005, 08:49 PM
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??

09-20-2005, 09:55 PM
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.


09-20-2005, 10:52 PM
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.

09-20-2005, 11:11 PM
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.

09-21-2005, 01:31 AM
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

<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>

this is the submit which goes to

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

09-21-2005, 06:08 AM
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.

09-21-2005, 02:49 PM
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.

09-22-2005, 08:26 AM
It's better if you just change your implementation to this:

<form onsubmit="return TestDataCheck(this)">
<input type="image" src="images/submit.jpg" name="web_app" border="0" alt="Submit the Web Linking Application Form" />