function call in select option code example
Example 1: javascript prevent value change in select option
old_value = $('#select :selected').val();
$('#select').change(function() {
if($(this).val() == 'option 3') {//your specific condition
$('#select').val(old_value);
} else {
old_value = $('#select :selected').val();
}
});
Example 2: javascript function call with variable
function abc() {
alert('test');
}
var funcName = 'abc';
window[funcName]();