events - Return value ignored from Jquery function -


i have piece of jquery attached asp.net web forms front-end (the input controls of form wrapped standard asp.net ajax panel) has 3 dropdown lists have piece of jquery attached:

$(document).ready(function () {     jquery("select").change(function () {         alert("hi");         return false;     }); }); 

the dropdowns have server-side change event attached asp.net expect postback:

<select name="ctl00$leftcontent$cmbpressureunitspo" tabindex="6" class="unit" id="cmbpressureunitspo" onchange="javascript:settimeout('__dopostback(\'ctl00$leftcontent$cmbpressureunitspo\',\'\')', 0)">             <option value="1">kpag</option>             <option value="1000">pag (n/m²)</option>             <option selected="selected" value="0.001">mpag</option>             <option value="0.14504">psig</option>             <option value="10">mbarg</option>             <option value="0.01">barg</option>             <option value="0.010197">kgf/cm²</option>             <option value="0.010197">atg</option>             <option value="0.0098692">atmg</option>             <option value="7.5001">torrg (mmhg)</option>             <option value="101.97">mmh₂o</option>             <option value="0.29528">inhg</option>          </select> 

the problem return false not suppress server-side event expect! if implement normal javascript function returns false does, missing?

i have tried event.preventdefault no effect!

it appears __dopostback method wrapped in settimeout bound onchange handler.

<select ...  onchange="javascript:settimeout('__dopostback(\'ctl00$leftcontent$cmbpressureunitspo\',\'\')', 0)"> 

your event handler (bound select element via jquery) called separate (and guess, before, given how settimeout works - never know... quirks of timers)


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -