Trigger specific form submit button with jQuery dialog button
Posted on 2012-08-30
I have a form with 4 submit buttons. Two are different buttons, two at the top of the form, 2 similar at the bottom. (because form is long)
First is called submit A
Second is called submit B
When submit B is pressed the form just submits.
When submit A is pressed, a dialog appears with 2 buttons. A and B. When button A is pressed i would like form submit button A to submit the form.
When dialog button B is pressed i would like submit button B to submit the form.
This because the buttons have different names, so the post handling will be different.
My question, how can i trigger a specific form submit button with a dialog button?
I tried by giving two of the same form submit buttons a class and then:
But this doesn't work.
Thanks for the help!