143
rated 0 times
[
146]
[
3]
/ answers: 1 / hits: 59036
/ 12 Years ago, wed, september 5, 2012, 12:00:00
I want to change the value of an input field whenever the value of another one is changed.
I've tried for a while and I can't seem to get it to work
<input class=span4 input-big id=dare_price name=price size=30 type=text onChange=updatePrice() />
<input class=span4 input-big id=total_price_amount readonly=readonly value=/>
function updatePrice() {
var price = $(#dare_price).val();
var total = (price + 1) * 1.05;
$($total_price_amount).val(total);
}
More From » jquery