autochecking checkbox based on form field being filled in
Posted on 2004-10-20
I have a page that contains a quantity field as well as an 'add' checkbox field that users use to add the item to their shopping cart. I want to get rid of this checkbox requirement by having it autocheck when a value is entered in to the quantity field. What would be the correct syntax to do this?
Here's a code snippet that's currently on the page:
<input type="text" name="Qty" size="4" maxlength="4" value="">
<input type="checkbox" name="AddBook" value="#ISBN#"> I need this form element to both autocheck when a form quantity field is entered in. I also need this checkbox to be hidden as well.