I need to prompt an alert message when a user selects a particular option in a select menu. Is there a way to do this using jQuery?
A:
I recently bumped into the jQuery Confirm Plugin. It may or may be what you are looking for.
ayaz
2008-12-04 17:18:24
+2
A:
assuming your select has an ID of myselect, and the value you want to check is "myval"
$("#myselect").change(function() {
if($(this).val() == "myval")
{
alert('message');
}
});
I havent tested this but the concept should be sound
Neil Aitken
2008-12-04 17:19:12