modify a form so that the page does not refresh on submit

Firefox

New Member
I have a simple form whereby an input field is given a value if a certain button is clicked. The problem is it takes to long to reload the page and I would like to submit it without refreshing the page. I have tried adapting certain AJAX,JQuery scripts from different types but they haven't worked, can anyone suggest a some simple code to use. Here is the basic example:\[code\]<html><form method='POST' action='test2.php'><input type='text' name='input_a' value='http://stackoverflow.com/questions/12755625/<?php if($_POST['submit_a']){ echo "test1";} ?>'><input type='submit' name='submit_a' vhttp://stackoverflow.com/questions/12755625/alue='a'><input type='text' name='input_b' value='http://stackoverflow.com/questions/12755625/<?php if($_POST['submit_b']){ echo "test2";}?>'><input type='submit' name='submit_b' value='http://stackoverflow.com/questions/12755625/b'></form></html>\[/code\]
 
Back
Top