[Javascript] validating a form using Javascript

Peter Brunone peter at brunone.com
Wed Jan 22 11:00:54 CST 2003


>if (document.openp5.cexptot.value,indexOf('-2') != -1 ) {

   I'm assuming that comma should be a period :)

-Peter "Nitpicker" Brunone

---------- Original Message ----------------------------------
From: "Peter-Paul Koch" <gassinaumasis at hotmail.com>
Reply-To: javascript at LaTech.edu
Date: Wed, 22 Jan 2003 16:58:01 +0000

>>I need your help again! Someone always has a solution to my problem so I 
>>have my fingers crossed!
>>
>>I am using ColdFusion to input data into an Access database.
>>My instructions are to include:
>>
>>A default value of "-2" in all fields and then performs an edit check
>>for that "-2" to force the user to replace the "-2".
>>
>>Validate all addition used on the form.
>>
>>I wrote a JavaScript function that checks for "-2" when the form is
>>submitted and gives the user a message to change the incorrect field.
>>It then checks the addition on the form.  I thought it was working fine
>>but found problems during testing.
>
>>   if (document.openp5.cexptot.value =="-2") {
>
>if (document.openp5.cexptot.value,indexOf('-2') != -1 ) {
>
>I don't know Cold Fusion so I can't help you with your other question.
>
>--------------------------------------------------
>ppk, freelance web developer
>Interaction, copywriting, JavaScript, integration
>http://www.xs4all.nl/~ppk/
>Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
>



More information about the Javascript mailing list