I've got a script that gets info from a PHP page via JSON. Normally the script responds to clicks on a form, dynamically loading results. In this mode of operation I found the script worked fine in all browsers except IE7, where the following line would cause the time for the jquery to be executed to increase massively for every additional result:
$(output).find('a.list').click(function(e){ $(this).shortList(); e.preventDefault(); }).end().appendTo('#results'); Where "output" is a large block of HTML containing a DIV for each result returned. I disabled this on IE in favour of the following code: $('#results').html(output); Which worked fine. However, when the page loads it does an initial check to a different PHP script to see if a user has searched previously - if it has it immediately returns the same JSON information as the last search returned (from a stored .txt file). So the information sent to the JSON handler in this case is _identical_ to the search they have already performed. However at this point, using the above .html() method to output the data causes the browser to crash horribly - CPU usage shoots up to near 100% and won't go down even if left for 20 minutes - the only way to terminate the program is via task manager. I've no idea why this happens when its the same script running on the same data - the only difference is that a user has navigated to the page using the "Back" button rather than via normal hyperlinks. Anyone have any suggestions on where its going wrong or examples of similar bugs?