close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Client Side Validation on ecart checkout button

Thread began 12/13/2010 10:17 am by eyoung296270 | Last modified 12/13/2010 4:54 pm by eyoung296270 | 981 views | 3 replies

Jason ByrnesWebAssist

client side validation will not work with an add to cart button that is set to look up the item from a recordset.

client validation will only work with a static add to cart button.


the problem with an add to cart button that is set to lookup the item from a recordset is that the form name is dynamic.


if you view source of your page in the browser, the form element code looks like:

<form action="/factory-spa-covers-detail-shape2-step.php?ItemsID=1&ItemColor=9&shapeID=2&ItemCatID=19" method="POST" name="eCart1_1_ATC_1" onsubmit="WAValidateRQ(document.eCart1_1_ATC_.eCart1_1_MeasureB_Add,'-Measurement B is required',document.eCart1_1_ATC_.eCart1_1_MeasureB_Add,0,false,'text');WAValidateRQ(document.eCart1_1_ATC_.eCart1_1_MeasureA_Add,'-Measurement A is required',document.eCart1_1_ATC_.eCart1_1_MeasureA_Add,0,false,'text');WAValidateRQ(document.eCart1_1_ATC_.eCart1_1_Skirt_Add,'-Skirt Length is required',document.eCart1_1_ATC_.eCart1_1_Skirt_Add,0,false,'text');WAAlertErrors('The following errors were found','Correct invalid entries to continue',true,false);return document.MM_returnValue">


the code that looks for the element name:
document.eCart1_1_ATC_.eCart1_1_MeasureB_Add

has the form name wrong. the name is:
name="eCart1_1_ATC_1"

so that code needs to be adjusted to:
document.eCart1_1_ATC_1.eCart1_1_MeasureB_Add

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...