I have a select list page (ASP.NET MVC page)
The selected list and onchange event are listed as follows:
<%=Html.DropDownList("CompanyID", Model.CompanySelectList, "(select company)", new { @class = "data-entry-field", @onchange = "companySelectListChanged()" })%>
Is companySelectListChanged function called twice?
I use excellent code in this question to get the caller.
both times the caller is an onchange event, however, if I look at the caller using:
arguments.callee.caller.caller
the first call returns some system code as the caller (I suppose), and the second call returns undefined.
I check that undefined only reacts once on onchange, but that doesn't seem ideal, can whcy be called twice?
UPDATE:
ok, !... :-), companySelectListChanged - .
onchange , . companySelectListChanged.
.. "data-entry-field", javascript , . , onchange , companySelectListChanged ?
:
$('. data-entry-field'). bind ('keypress changeup', function (e) {highLightSaveButtons();});
, 2 , , - ?
?
:
select , , 'change'. "change", , "onchange" .
jQuery, , , onchange jquery ? , , , IE jquery.