If I have a web form that contains a select dropdown in that has an ID attribute of "shipping_state":
<select name="shipping_state">
Open in new window
How might I customize that form so that when a person chooses the state of Florida from that dropdown ..
<option value="FL">
Open in new window
.. a custom javascript function gets triggered?
Ideally .. I would prefer a solution that do NOT require that I modify the form itself.
I am open to solutions that require JQuery if that is the best approach. Otherwise, plain old javascript will do.
Thanks in advance.
- Yvan
if($(" :selected",this).val()=="F
// your function here
}
}