View Full Version : Problem with validating XHTML with onSubmit in a form

Mar 26th, 2007, 11:15 PM
I'm having problems in getting a page with a form which calls a script to validate the form content to validate as correct XHTML strict. The bit of offending code is:

<form action="/Scripts/formmail.asp" method="post" id="formJoinMailingList" onSubmit="...

W3's validator tells me there is no attribute "onSubmit", so I'm now wondering how I call the script I use to validate the content of the form in a standards-compliant way.

Anyone got any ideas?

Mar 26th, 2007, 11:20 PM
Its tell you that because there isn't one. ALL I repeat ALL tags and event handlers must be in lowercase.

onsubmit is what you should use.

Mar 27th, 2007, 11:47 AM
How stupid do I feel? My only excuse was that it was late and I was coming to the end of a 14 hour day...