Jump to content

onFocus event for <select>


brucemand
 Share

Recommended Posts

if a user uses the keyboard to change the value of a <select>, ie. up/down through the <option>s, does it trigger another onFocus event ?if not, how would you catch it then ?

Link to comment
Share on other sites

The onfocus event fires just when the select is focused, even if the keyboard was used to focus it. Changing the value only happend after the element has been focused.If you want to detect when the content of the select has been changed, use the onchange event instead.

Link to comment
Share on other sites

The onfocus event fires just when the select is focused, even if the keyboard was used to focus it. Changing the value only happend after the element has been focused.If you want to detect when the content of the select has been changed, use the onchange event instead.
ahh, *thanks* !!a much better event to use since it's being preloaded with a value.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...