I am working in a website where i am integrating order and payment gateway. I have three textbox. Textbox1, where i have the number of quantity and Textbox2, where i have cost of one order and in Textbox3 i am displaying the Total cost of Order. Now What i have to do is to get the Total order cost, depending upon number of order without page load with jquery or Ajax.
I have tried as follows, But it wont work.
$(document).ready(function() {
$(".Textbox1").keyup(function(){
var valone = $('#Textbox1').val();
var valtwo = $('#Textbox2').val();
var total = ((valone * 1) * (valtwo * 1));
$('#Textbox3 ').text(total);
});
});
use:
.val(value) Set the value of each element in the set of matched elements.
You can read more on this here
Let me know if this helps.