Click here to Skip to main content
15,901,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Jquery:I called onchange event of textbox on document.readyfunction. i have called method on onchange which fetching the value from database and assigning values to controls.some time my drop down value is not getting changed?randomly this issue occurred.

What I have tried:

<input type="text" id="txtmid" maxlength="15" onchange="GetISFDetails(this)" class="mws-textinput numbersOnly mandatory" style="font-family: PTSansRegular, Arial, Helvetica, sans-serif; font-size: 13.4915px;">


 var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
//                if (vars[hash[0]] == "" || vars[hash[0]] == "0") {
                    $('.tblmid').find('#txtmid').val(vars[hash[0]]);
                    $('.tblmid').find('#txtmid').change();
              //  }
            }


  function GetISFDetails(obj) {
            debugger
            var jqddlobject = $(obj);
<pre> var obj = $.parseJSON(data.d);
                    for (var a = 0; a < 2; a++) {

                        if (a == 0) {
                            for (var c = 0; c < obj[a].length; c++) {
jqddlobject.closest('table').find('.ddlMstatus').val(obj[a][c].STATUS);
                                jqddlobject.closest('table').find('.ddlMstatus').trigger("liszt:updated");
}}<pre>
Posted
Comments
Bryian Tan 1-Jul-18 19:55pm    
have you try it on different browser? By the way, is not clear how GetISFDetails function get the data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900