Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Onblur Event is not Firing in IE9.
See this is my code.

C#
function CheckRow(id) {
            var ids = id.split('_');
            var txt = ids[2];
            //document.getElementById('btnSave').disabled = true;
            //document.getElementById('hdnStatus').value = "";
            //document.getElementById(''+ ids[0] + '_' + ids[1] + '_' + 'hdnSplitAmount').value='';

            $("#divgv table tr").each(function() {
                var tr = $(this).closest("tr");
                $(tr).find("input:text[id$=" + txt + "]").change(
                function(event) {
                    var txtval = $(this).val();
                    var hdn = $(tr).find("input:hidden[id$=hdnAmount]").val();
                    if (txtval != undefined && hdn != undefined) {
                        txtval = Number(txtval);
                        hdn = Number(hdn);
                        var chk = $(tr).find("input:checkbox[id$=chkBox]");
                        if (hdn != txtval) {

                            chk.attr('checked', true);
                            // document.getElementById('btnSave').disabled = false;
                            //document.getElementById('hdnStatus').value = "Changed";


                        }
                        else {
                            chk.attr('checked', false);
                        }

                        document.getElementById('hdnStatus').value = "Changed";

                    }
                }
                );
            });
        }


on blur event i am calling this function but this not workig and that check box also not checked .other than ie9 it is working fine.
Please help me ...
Posted

1 solution

Remove the onblur attribute from the textbox and use the jQuery blur event below:

C#
$('#target').blur(function() {
  var id = $(this).attr('id');
  CheckRow(id);  
});
 
Share this answer
 

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