I have 2 SUBMIT button in a form one is display:hidden and one is display:block
if user click on SUBMIT button (display:block) then another SUBMIT button {display:hidden} should also submitted.
Is it possible with jquery?
I have 2 SUBMIT button in a form one is display:hidden and one is display:block
if user click on SUBMIT button (display:block) then another SUBMIT button {display:hidden} should also submitted.
Is it possible with jquery?
You can trigger the other button click using trigger. Something like
$("#btn1").click(function(){
// event handler for button 1
$("#btn2").trigger("click"); // trigger button 2 click event handler
});
$("#btn2").click(function(){
// event handler for button 2
});
That does not make sense: either you need 2 actions to be formed, and so, you solve it through your serverside processing script, or you need that second button value, in such case you use it as "hidden" input field <input type="hidden" name="foo" value="bar"/>