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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -