The following code works fine at finding the value of price, which is held in a label field. However I need quantity held in a text area, but it’s not working.
Any ideas?
The Javascript:
var price = parseInt(ui.draggable.find(".price").html().replace("$ ", ""));
var qty = parseInt(ui.draggable.find(".qty").html());
The HTML:
<label class="price">$ 100</label>
<input name="qty_1" type="text" class="qty" id="qty_1" value="1" size="2" maxlength="2">
For setting/getting values of form elements
valmethod should be used instead ofhtml/text.Also you should specify the
radixinparseInt.