close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

cannot EDIT validation without causing error

Thread began 7/21/2010 10:36 am by sam308940 | Last modified 7/30/2010 8:31 pm by sam308940 | 1079 views | 8 replies

sam308940

cannot EDIT validation without causing error

So I have some validation on a page. specifically the checkout page in ecart.

so its working fine.
but i have 1 field that is a select menu and I want to add that as a required item.

when i go to the validation tool to edit, I get 2 kinds of errors.
1. if i go to edit and dont add any new validation, then when i hit finish - it rewrites the code except refers to every validation rule to one field. (it changes them all to the email field).

i also tried editing and adding the new field to the validation and i get the same error. I just tested it without adding new validation to see if it was the new rule or not.



2. I created a test page with a select field on it and added validation. worked fine. so i copied that code over to my current working checkout page (current unedited validation works). adding the 1 line of code caused the form to not validate at all. and I did put it in the correct place. Unless there is a sequences where selects has to go for validation.


ANY HELP!? DO YOU SEE MY ERROR? WHAT AM I DOING WRONG?!

HERES THE LINE I ADDED (just before the alert errors code)
WAValidateRQ(document.forms[0].order_hear,'- Agree to terms is required',document.forms[0].order_hear,0,true,'select');


HERES THE CURRENT VALIDATION CODE FROM THE ON SUBMIT
onsubmit="WAValidateCC(document.forms[0].cc_number,document.forms[0].cc_number.value,'- Invalid credit card number','','4:51:52:53:54:55:34:37:',document.forms[0].cc_number,0,true);WAValidateEL(document.forms[0].cc_number,document.forms[0].cc_number.value,'- Invalid number of characters in Card Number',12,20,'',document.forms[0].cc_number,0,true);WAValidateNM(document.forms[0].cvv,'- Invalid Security Code.',0,9999,0,'','',',.',document.forms[0].cvv,0,true);WAValidateEL(document.forms[0].cvv,document.forms[0].cvv.value,'- Invalid number of characters in Security Code',3,4,'',document.forms[0].cvv,0,true);WAValidateEM(document.forms[0].email,document.forms[0].email.value,'- Invalid Email Address',document.forms[0].email,0,true);WAValidateEL(document.forms[0].firstname,document.forms[0].firstname.value,'- Invalid First name',2,50,'',document.forms[0].firstname,0,true);WAValidateEL(document.forms[0].lastname,document.forms[0].lastname.value,'- Invalid Last name',2,50,'',document.forms[0].lastname,0,true);WAValidateEL(document.forms[0].phone,document.forms[0].phone.value,'- Invalid Phone Number',2,50,'',document.forms[0].phone,0,true);WAValidateEL(document.forms[0].street1,document.forms[0].street1.value,'- Invalid Street Address',2,100,'',document.forms[0].street1,0,true);WAValidateEL(document.forms[0].city,document.forms[0].city.value,'- Invalid City',2,100,'',document.forms[0].city,0,true);WAValidateEL(document.forms[0].postcode,document.forms[0].postcode.value,'- Invalid Zip/Postal Code',2,20,'',document.forms[0].postcode,0,true);WAValidateEL(document.forms[0].shipping_firstname,document.forms[0].shipping_firstname.value,'- Invalid Shipping Information, First name',2,100,'',document.forms[0].shipping_firstname,0,true);WAValidateEL(document.forms[0].shipping_lastname,document.forms[0].shipping_lastname.value,'- Invalid Shipping Information, Last name',2,100,'',document.forms[0].shipping_lastname,0,true);WAValidateEL(document.forms[0].shipping_phone,document.forms[0].shipping_phone.value,'- Invalid Shipping Information, Phone',2,100,'',document.forms[0].shipping_phone,0,true);WAValidateEL(document.forms[0].shipping_street1,document.forms[0].shipping_street1.value,'- Invalid Shipping Information, Street Address',2,100,'',document.forms[0].shipping_street1,0,true);WAValidateEL(document.forms[0].shipping_city,document.forms[0].shipping_city.value,'- Invalid Shipping Information, City',2,100,'',document.forms[0].shipping_city,0,true);WAValidateEL(document.forms[0].shipping_postcode,document.forms[0].shipping_postcode.value,'- Invalid Shipping Information, Zip/Postal Code',2,20,'',document.forms[0].shipping_postcode,0,true);WAValidateRQ(document.forms[0].order_terms,'- Agree to terms is required',document.forms[0].order_terms,0,true,'checkbox');WAAlertErrors('The following errors were found:','',true,false,false);return document.MM_returnValue"

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...