this wierd, not sure why happening onchange firing twice. help/ideas appreciated...
<select id="ddlgender" onchange="myfunc()"> <option value="1">-select-</option> <option value="2">male</option> <option value="3">female</option> <option value="4">notspecified</option> </select>
your java script code should in java script file loaded in head:
$(document).ready(function(){ $("#ddlgender").unbind('click').change(myfunc); var myfunc = function (e) { // important.... } });
if remember correctly need unbind click event select in ie in order avoid firing event twice.
and html should not have onchange more:
<select id="ddlgender"> <option value="1">-select-</option> <option value="2">male</option> <option value="3">female</option> <option value="4">notspecified</option> </select>
Comments
Post a Comment