I have a form on my jsp,
<form action="test1_action" name="test" method="post" id="test">
also I have two different link link1, link2 here,
onclick of link1 I should submit test1_action action
$('#link1').click(function() {
document.forms['test'].action='test1_action';
document.forms['test'].submit();
});
This works perfect for me.
what My expectation is when I click the second link popup should open with different action something like follows below.
$('#link2').click(function() {
document.forms['test'].action='**different_action**';
document.forms['test'].submit();
});