value is determined by the value attribute if set.
Always assign the value attribute or you'll get inconsistent results.
The problem I'm having is that I don't want the value changed on onchange but when the user clicks the Submit button.
Not quite sure what you mean by that, but you can use the onsubmit handler to read the value of the <select> and copy it presumably into a hidden-type element.
Code:
<form onsubmit='this.notShown.value = this.mySelect.value'>
<select name = 'mySelect'>
....
<input type='hidden' name='notShown'>
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!
Bookmarks