I have 3 buttons on the page and each has type of submit.So how we can identify on other page which one button is clicked??
All HTML controls are identified by there name. In a single page you can press only one button at a time for eg.. <input type="submit" name="add" value="Add"> <input type="submit" name="edit" value="Edit"> <input type="submit" name="delete" value="Delete"> Code (markup): In the above example all the three buttons have the type as submit but the individual buttons are identified by there names if you are using php, then php captures all form controls in super global arrays ii.e $_POST or $_GET depending upon the method used to post the form. you can print the arrays with print_r($_GET); PHP: or print_r($_POST); PHP: to check what all controls have been passed through the forms hope this would help you
Well the thing that i want is. I have 3 buttons with ids b1,b2,b3 <form name='form1' action='abc.jsp'> <input type='Submit' value='b1' id='b1'/> <input type='Submit' value='b2' id='b2'/> <input type='Submit' value='b3' id='b3'/> </form> So i want to get the value of button on jsp page using javascript that which one button was clicked,Do you think i have to define some hidden variable?? Any solution??