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

javaScript to prevent form submit with 0 value

Thread began 1/18/2013 3:38 pm by Roxana | Last modified 1/20/2013 8:00 pm by Roxana | 6146 views | 9 replies


Did you mean, I cannot refer to a php variable in a javascript function?

I needed to add ";" to the code, so it didn't show a syntax error. Then I put it in the head section of the page, but it still allows the item to be put into the cart. I also tried it right after the code for the version and size selection, but that also didn't work. I don't know if adding the ";" messed it all up.

The code looks like this now:

if ($row_rspricetable['price'] == "0")
echo("make a selection");

On page load, when the price is still $0, it does not display the message. I thought it might. But it would not only have to display the message but also prevent the item from being added to the cart.

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





Ease of use


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