PDA

View Full Version : JavaScript is causing my page not to validate



jonathan_mville
05-17-2007, 12:28 AM
I'm not a web design newbie but javascript is not my forte. I am using a javascript on my page that requires the user to click a checkbox before the submit buttom becomes active. The page is 100% xhtml strict valid, except when I add the javascript. The javascript wrecks havoc on the validator. The error messages on the W3C validator make no sense to me. The page seems to function fine, and the script functions fine, but it causes all kind of error messages when validating. Is there any javascript pro here that can take a look at the W3C error messages my code generates and offer any suggestions? My test page is here (http://www.newnan.com/jfm/test/).

note: the button has not been added to the test page yet. i'm trying to get it to validate before I proceed any further.

Twey
05-17-2007, 10:58 AM
Make your script external.

Serving XHTML isn't currently a good idea, though. See this thread (http://www.dynamicdrive.com/forums/showthread.php?p=92730) for a detailed discussion.