0

we Load our pages from the menu link using ajax (clear main div and then load url of clicked menu)

the issue we are facing is that jQuery still calls the functions which were in previous page and should not be invoked for next page ..

an example jquery code is as under:

 $("#ComponentContainer").load(url, function (response, status, xhr) {

        if (response != null && response.Code != undefined && response.Code == 502) {
            ShowAlertMessage(response.ResponseText, response.MessageClass);
        }

        if (typeof PostPageLoad == 'function') {
            PostPageLoad();
        }
        //$("#ComponentHeading").html(title);
        if (typeof SelectNoteRows === "function") {
            SelectNoteRows();
        }
    });

e.g. the function SelectNoteRows was present on page A and should work as needed . but it is still being invoked when loading page B via ajax which is causing unrequired behaviour

any help appreciated..

Abdul Ali
  • 1,631
  • 6
  • 23
  • 48

0 Answers0