close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Client Side Validation on ecart checkout button

Thread began 12/13/2010 7:17 am by eyoung296270 | Last modified 12/13/2010 1:54 pm by Jason Byrnes | 1627 views | 3 replies |

eyoung296270

Client Side Validation on ecart checkout button

I really need to get this going. Is there any reason why the form fields validation doesn't work on an add to cart form when there is another form on the page with a show cart form?
Mine doesn't work at
factory-spa-covers-detail-shape2-step.php?ItemsID=1&ItemColor=9&shapeID=2&ItemCatID=19

Sign in to reply to this post

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

Sign in to reply to this post

eyoung296270

Thanks for the follow up. So, it isn't possible to validate the fields in the dynamic form?

Sign in to reply to this post

Jason ByrnesWebAssist

no, not without modifying the code by hand.

Sign in to reply to this post

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