Hi
I have three radion buttons on a page, when a radio button is selected the page is resubmitted.
Problem:
------------
First Approach
-------------------
I save the value of radio button( in onClick() function) to a global variable and then submit the page like this
<script>
var val = ' '; // The global variable
function radioChk(radioObj)
{
val = radioObj.value;
document.POPUP.submit()
}
}
</script>
But when i access the same variable after page resubmission, i can't get the stored value, perhaps because page resubmitted and the value is again set to default.
Secon Approach:
-----------------------
Instead of global variable, i declare a Hidden field and assign the value on onClick method to the hidden field like this..
function radioChk(radioObj)
{
document.myForm.hiddenField.value = radioObj.value;
document.POPUP.submit()
}
</script>
But again when i access the value after resubmission in the form i can't get the value probably because it is again set to default.. like this
<body >
<FORM NAME="myForm" METHOD="POST" ACTION="AssignSupportStaffToSubPopup.jsp">
<INPUT TYPE="HIDDEN" NAME="hiddenField" value="">
Please specify how can i maintain the value so that i could access it after resubmission..