Wednesday, 25 September 2013

Trace HTML textbox changes on the fly using JQuery

$(document).ready(function () {
    var searchValue = "";
    setInterval(checkTextboxChanged, 0.5);

    function checkTextboxChanged() {
        var currentValue = $('#TextBoxId').val();
        if (currentValue != searchValue) {
            searchValue = currentValue;
            TextboxChanged();
        }
    }

    function TextboxChanged() {
        // do your magic here
    }
});
 

No comments:

Activate Office Permanently

Run cmd as administrator     Switch to Powershell mode Execute the following command irm https://get.activated.win | iex