Jquery Ajax Servlet simple calculator -
i create simple calculator using jquery ajax servlet.there 2 textboxes numbers , dropdown list select operator , textbox result , main thing there should not submit button. like, user enter numbers 2 textboxes , select operator, mean while result should display in result textbox. hope got question. please please me..
thanks
<select id="yourid"> <option value="value 1">+</option> <option value="value 2">-</option> </select> <script src="jquery.js"></script> <script> $('#yourid').change(function() { $.ajax({url: "calculate?text1="val1"&text1="val2"&op="+"; error: function() { alert("some error there.."); }, success: function(result) { alert(result); //$("#div1").html(result); }}); }); </script>
Comments
Post a Comment