Ok, I have spent a while on this problem and this is what I have gathered:
If you make an AJAX call in IE7 and you have a window.onbeforeunload function spe
This could very possible solve your problem!
Because I had a similar issue and this made go way!
window.onbeforeunload = warnFunction;
var warnRequired = true;
function warnFunction () {
if (warnRequired) return ("Please Stay! Don't go!");
return ;
}
And whenever I do a Ajax call or Popup another window, I just set warnRequired to false.
One other thing just be aware when making an Ajax call that it is synchronized else the variable might not have been set yet! (A nasty Gotcha!)