How do i "SET" the action(not changing) AFTER the form has been submit?
<form id="serialize" action="newjob.php?serialize=newjob" method="post">
<button id="jobsearch" name="jobsearch">GET FROM DB</button>
</form>
AFTER the form has been submit and showing the value i need from db, SET the new action for the form, example after submit how do i get like this one so i can add the value to db?
<form id="serialize" action="newjob.php?faulty=newjob" method="post">
<button id="jobsearch" name="jobsearch">ADD TO DB</button>
</form>
as far as i know by search on the net this jquery only CHANGING(onsubmit) and not after submit
$(function(){
$('#serialize').submit(function (event)
{
var newaction = 'newjob.php?faulty=newjob';
$(this).attr('action', newaction);
});
});
it is possible to had AFTER form has been submit then set the new form action for the same form? the only thing i need to accomplish this is because i cant have a form inside a form(nested)