I have a select statement that redirects to a different page when it is created.
I know this is not the best way of doing forms but this is the way I have to do it.
I am having problems adding the selected item from the select box to add it to the url.
This is the code I have:
As is now, the onchange part works and i get redirected; but the value for stateId in stateSearch.jsp is literally "this.options[this.selectedIndex].value"HTML Code:<select onChange="window.location.href='stateSearch.jsp?stateId=this.options[this.selectedIndex].value'" name="StateId" > <option value="3">State 1</option> <option value="2">State 2</option> <option value="1">State 3</option> </select>
as opposed to be the actual selected value.
Any Ideas on how I can fix this?


Reply With Quote

Bookmarks