|
|
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? | |
| |
|
|
There is no answer at this time. |
|
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? |
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 Home - Answers FAQ - Terms of Service - Privacy Policy |