amethystct
Programmer
I have a form w/ 5 selects. When you first enter this page only the first select is filled. Once the user selects one of the options I want it to refresh the page so I can fill the next select based. And so on for each select list. I have a server side process that's called whenever the page is refreshed but for some reason, if I just refresh the page, it doesn't store the value that I've selected. If I instead make a selection and hit the submit button (for a different process) then the value is saved.
I've tried including hidden fields for the values and setting the form values in the refresh function but it doesn't work.
What am I doing wrong?
function refreshMe() {
// document.forms.theform._D:areaNbr.value = document.forms.theform.areaNbr.value;
// document.forms.theform.whseCode.value = document.forms.theform.whseCode.value;
// document.forms.theform.contractNbr.value = document.forms.theform.contractNbr.value;
// document.forms.theform.aomsNumber.value = document.forms.theform.aomsNumber.value;
// document.forms.theform.poNumber.value = document.forms.theform.poNumber.value;
window.location.reload();
}
<TD ALIGN="LEFT" NOWRAP><B>Area RSLs:</B></TD>
<TD WIDTH="70%"> <select NAME="areaNbr" CLASS="select">
<OPTION VALUE="">
<option VALUE="1101 ">Pennsylvania/New Jersey Area
<option VALUE="1102 ">New England Area
</select></TD>
I've tried including hidden fields for the values and setting the form values in the refresh function but it doesn't work.
What am I doing wrong?
function refreshMe() {
// document.forms.theform._D:areaNbr.value = document.forms.theform.areaNbr.value;
// document.forms.theform.whseCode.value = document.forms.theform.whseCode.value;
// document.forms.theform.contractNbr.value = document.forms.theform.contractNbr.value;
// document.forms.theform.aomsNumber.value = document.forms.theform.aomsNumber.value;
// document.forms.theform.poNumber.value = document.forms.theform.poNumber.value;
window.location.reload();
}
<TD ALIGN="LEFT" NOWRAP><B>Area RSLs:</B></TD>
<TD WIDTH="70%"> <select NAME="areaNbr" CLASS="select">
<OPTION VALUE="">
<option VALUE="1101 ">Pennsylvania/New Jersey Area
<option VALUE="1102 ">New England Area
</select></TD>