I\'m working on a project that will be using a lot of select menus to enter various data. I\'d like to include an \'other\' option directly in the select that will trigger a sim
This will get you started. This will add the functionality to any select on the page, appending a new value to the select (and leaving other still available in case a mistake has been made).
$(function() {
$('select').change( function() {
var value = $(this).val();
if (!value || value == '') {
var other = prompt( "Please indicate other value:" );
if (!other) return false;
$(this).append('');
}
});
});