I have this code in jquery :
$("#order_btn").click(function(){
var totalprice = $(".price_amount").text();
$("#totalprice").val(totalprice);
});
When I submit this form with a hidden value i will get the totalprice value two times, if its 200000 i will get 200000200000. why ?
<input type="hidden" value="" name="totalprice" id="totalprice">
<input id="order_btn" type="submit" class="submit" name="submit" value="submit">
the price amout will defined here :
<span class="price_amount">75000</span>
I have this span tag two times, but I need both of them, is there a way to get one value only ?