Preventing incorrect selection in drop-down listsHave you noticed how often you select an item from a drop down list and then alter your selection when you use your mouse scroll wheel to move down the page? This can have annoying consequences but is easy to solve with a little JavaScript. How?Add an OnChange event to the <select> tag as follows: <form name="myForm" action=".." method = ".."> <select name="mySelect" OnChange="myForm.NextField.focus()"> <input type="text" name="NextField" size="30" /> </form> Notice that the 'OnChange' event refers to both the form name and the name of
the next input field. ExamplesTry the examples below, one without this and one with it.
|
|
Expression Blend and Design
|
|