[OSM-dev] two javascript challenges for enthusiastic hackers

Christopher Schmidt crschmidt at metacarta.com
Thu May 17 12:21:10 BST 2007


On Thu, May 17, 2007 at 12:05:07PM +0100, Andy Street wrote:
> On Thu, 17 May 2007 11:43:19 +0100 "Nick Black" <nickblack1 at gmail.com>
> wrote:
> 
> > Q1:  How can I stop the form from submitting if the details aren't
> > correct?
> 
> Change the onclick in the submit button to the following:
> 
>   onclick="return formValidation();"

Note that this may not prevent submissions by people pressing 'enter' on
the form. (onsubmit on the form instead/in addition might be helpful.)

Regards,
-- 
Christopher Schmidt
MetaCarta




More information about the dev mailing list