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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

What pattern do I need to jQuery Validate a value less than a particular number?

Thread began 5/23/2014 12:59 pm by Nathon Jones Web Design | Last modified 5/30/2014 3:18 am by Nathon Jones Web Design | 1563 views | 26 replies

Nathon Jones Web Design

Ah, I see. I've added that and it displays the message. Thank you.

The Add to Cart button was generated by the eCart behaviour so if it hasn't got an ID then that's why! I've added id="LEDCart_1_ATC" to the Add to Cart button. How do I add code to hide it or show it? Is that built in to the updatePriceDisplay function?

In addition to this, I'm following the Inventory Management Product Detail tutorials - currently on http://www.webassist.com/tutorials/Inventory-management-product-detail-III. I've got as far as hiding the Add to Cart button if the stock level is zero however I'm running into problems with the onchange event again because I need the RemainingInventory figure to change as the user makes selections from the variable drop-downs.

The onchange event uses a separate recordset that Ray created called rsAddtoCartLookup which, as I understand it, checks the values from the drop-downs and displays the correct price and product code. Should I be trying to incorporate the RemainingInventory field into THAT recordset so that it updates depending on which product is returned when the user has made their drop down selection/s?

I had tried this...

<?php if ($row_rsAddToCartLookup['RemainingInventory'] > 0) { ?>
<input type="image" src="energy-saving-light-bulbs/btn-addbasketoff.png" class="addbasketbtn" value="Add to Cart" name="LEDCart_1_ATC" id="LEDCart_1_ATC" alt="Add to Basket" border="0"/>
<input type="hidden" name="LEDid" id="LEDid" value="<?php echo $_GET['lbid']; ?>" />
<?php } else { ?>
Out of Stock
<?php
}
?>

...but of course that doesn't work because the onchange event isn't a post.

Also, if there are only 5 products left in stock, how do I prevent a user from submitting a value more than 5 in the quantity field, prior to Add to Cart?

Hope you can help.
Thank you Jason
NJ

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