johrik
12-14-2005, 04:37 AM
Hi all,
When the user selects Select Box 1 certain options are created (via a function) and populated in box 2. What I want to do is to remember the option selected in Box 2 and show this once the form has been submitted.
The application does know what was selected in Box 2 as when I do an alert it is displayed. But when I do:
document.predealform.selectBoxName.value = valueOfSecondBox nothing is shown...This is prob as once the page has been submitted I recall a function which remembers what was selected in box 1 and populates box 2.
Problem is that the Box 2 value shown is not the one selected rather the one that is created via the new Option("") code first in the list...
Can some one advise me further please?
When the user selects Select Box 1 certain options are created (via a function) and populated in box 2. What I want to do is to remember the option selected in Box 2 and show this once the form has been submitted.
The application does know what was selected in Box 2 as when I do an alert it is displayed. But when I do:
document.predealform.selectBoxName.value = valueOfSecondBox nothing is shown...This is prob as once the page has been submitted I recall a function which remembers what was selected in box 1 and populates box 2.
Problem is that the Box 2 value shown is not the one selected rather the one that is created via the new Option("") code first in the list...
Can some one advise me further please?