Tyler DeWitt
Tyler DeWitt

Reputation: 23576

React to a user selecting a value from a drop down

Is there a jQuery event that gets fired when a user selects a value from a drop down list?

I need to load the next part of a form based on the selection a user makes in the first drop down and would like to avoid a button press.

Thanks

Upvotes: 0

Views: 2750

Answers (3)

Sam Dufel
Sam Dufel

Reputation: 17598

The .change() event is fired when someone selects a value from a list.

If you don't have a blank default value as the first option ('Select One'), you'll need to explicitly trigger the .change event when the page loads to display whatever content for the first item.

Upvotes: 1

Tim
Tim

Reputation: 14446

You can use plain old Javascript for this:

 <select onchange='callMyMethod()'>

Upvotes: -1

Joseph Marikle
Joseph Marikle

Reputation: 78560

.change() event for the <select>

Upvotes: 1

Related Questions