My page has 2 forms say form1 and form2. now when form one is submitted, then I am setting the value of a hidden field in form 2:
$('#form1').submit(function (){
$("#hiddenfield").val($(this).serialize()) ;
alert($("#hiddenfield").val());
return true;
});
$('#form2').submit(function (){
alert($("#hiddenfield").val());
return true;
});
In the first alert the data is showing properly but when I am submitting the sencond form, the value is empty. What might be the issue?