Skip to main content

Javascript not working when enable the AJAX in DNN or .net

Dear All,
Today i found a solution finally to rebind the Javascript issue with support partially run with DNN

Here is the key
<script type="text/javascript">
    function BindControlEvents() {
        //jQuery is wrapped in BindEvents function so it can be re-bound after each callback.
        //Your code would replace the following line:
            $('#<%= TextProtocolDrugInstructions.ClientID %>').limit('100', '#charsLeft_Instructions');        
    }

    //Initial bind
    $(document).ready(function () {
        BindControlEvents();
    });

    //Re-bind for callbacks (This is a key)
    var prm = Sys.WebForms.PageRequestManager.getInstance();

    prm.add_endRequest(function() {
        BindControlEvents();
    });

</script>



Regards
Rashid Imran Bilgrami 

Comments