Script Stack Space Exhausted on Firefox

Script Stack Space Exhausted on Firefox

Hello,

I have a JSP page that I am updating via an AJAX post.  When the page gets sufficiently large, I get a "script stack space quota is exhausted" message.  I realize it is due to the size of the response, but is there a better way than the following?

  1. jQuery.fn.success = function(responseText, statusText, $form) {
  2.     var formId = '#' + $form.attr('id');
  3.     $(formId).replaceWith($(formId, responseText));

  4.     // Set up our form object again now that we've replaced our form with the data coming back.
  5.     $form = $(formId);
  6. // ...
  7. };