1

Possible Duplicate:
How to free memory after an Ajax request

I want to load different pages using AJAX but that pages have script into it, so when I load a page and show to the client, the script will run and then when I load other page, the script will remain and still active. How can I solve that by removing the script to free memory?

Example:

I have a page with this javascript function:

function detailTableInputFocus(id) {
    var DIV = document.getElementById('detail').getElementsByTagName('DIV')[0], input = document.getElementById(id);
    DIV.scrollTop = DIV.scrollHeight;
    input.select();
    input.focus();
};

When I load other page, I can call detailTableInputFocus with javascript and with Google Chrome I noticed that the used memory are increasing.

Sorry for my English.

Community
  • 1
  • 1
Fong-Wan Chau
  • 2,259
  • 4
  • 26
  • 42

0 Answers0