Google Answers Logo
View Question
 
Q: What is causing this javascript error? ( No Answer,   3 Comments )
Question  
Subject: What is causing this javascript error?
Category: Computers > Programming
Asked by: severisth-ga
List Price: $30.00
Posted: 31 Aug 2004 07:52 PDT
Expires: 01 Sep 2004 09:26 PDT
Question ID: 395047
I'm seeing a javascript error on this page:
https://www.mmc.org/mmc_residencies/geninfoelectivesapplication.htm?

But when I go to line 967 char 70, as IE suggests, all I find is a
line with no javascript.  On top of that, line 967 only has about 60
characters.  What could it be?

Clarification of Question by severisth-ga on 31 Aug 2004 08:57 PDT
omnivorous,

I'm working to eliminate the causes of the problems on those lines. 
I've got line 6 cleared - there was something in the keywords causing
the glitch.  Now I'm going through the footer to track down the other
glitch.  Thanks for your feedback!

Regarding different browsers & different susceptibility, the actual
problem on the page is that the submit button doesn't do anything, and
customers are reporting the problem.  Now I wish I had posted that as
the question instead of assuming that fixing the javascript error
would fix the submit button.  I'm crossing my fingers!!

Mike

Clarification of Question by severisth-ga on 31 Aug 2004 09:07 PDT
omnivorous,

I've cleared out the special characters which were causing the
validator to have trouble.  Hope this helps with the research!  I'm at
a loss...

Mike
Answer  
There is no answer at this time.

Comments  
Subject: Re: What is causing this javascript error?
From: omnivorous-ga on 31 Aug 2004 08:35 PDT
 
Severisth --

I am going to post this as a comment, though it MAY answer your question.

Different browsers have dramatically different susceptibility to
errors in coding.  Generally, I find Internet Explorer to be much more
tolerant of open tags and other errors than Netscape.

The following page is displaying perfectly for me in Internet Explorer version 6.0:
https://www.mmc.org/mmc_residencies/geninfoelectivesapplication.htm?

However, running it through the HTML validator page here, it appears
that the use of the # sign for comments is causing heartache (lines 6
and 1094).  This is the W3C HTML Validator used:
W3C Markup Validation Service
http://validator.w3.org/

The # sign (also called a cross-hatch or octothorpe) has a reserved use in HTML:
"In programming languages, markup languages, etc., this character has
many different uses. In some of these uses, # relates to ordinal
numbers (e.g. in HTML, &#n; denotes the character which occupies code
position n in Unicode)"

Tampere University of Technology
"Detailed descriptions of the characters," (Aug. 24, 2004)
http://www.cs.tut.fi/~jkorpela/latin1/3.html

Best regards,

Omnivorous-GA
Subject: Re: What is causing this javascript error?
From: ifof-ga on 31 Aug 2004 15:31 PDT
 
Error is located in this tag:

<input type=button onclick="if(document.Contactus.From.value!=''||document.Contactus.ssnone.value=''){document.Contactus.submit();}else{alert('Please
enter an Email address and Social Security
Number');document.Contactus.From.focus;};" value=Send name="button">

it is a bad use of = operator.

document.Contactus.ssnone.value=''

 It is used to assign a value to a variable. To verify a boolean
equality condition you must use == operator.
Replace the above condition with this one:

document.Contactus.ssnone.value==''

the correct tag now is:

<input type=button onclick="if(document.Contactus.From.value!=''||document.Contactus.ssnone.value==''){document.Contactus.submit();}else{alert('Please
enter an Email address and Social Security
Number');document.Contactus.From.focus;};" value=Send name="button">
Subject: Re: What is causing this javascript error?
From: severisth-ga on 01 Sep 2004 09:26 PDT
 
That was it!  Thanks ifof!

Did you have to read through the code, or were you able to run some
sort of validator?  Or even find the line and char that the error was
referring to?

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy