posted 16 years ago
We have a page with 2 frames, and this is for IE only, I did not try other browsers.
Left frame displays link menu only;
right frame displays the real html pages for links on the left, each link has a unique html page;
When I click Link 1 menu, the right frame load page 1's html;
When I click link 2 menu, the right frame load page 2's html. At the same time, the page 1 html has an onUnload function will be called. Our assumption is that the onUnload function of page 1's html will be called before any javascript function called in page 2.
But we found the sequence is not guanranteed, although it is true in 90% cases. And to make things worse, all the html pages in the right frame are hosted by a different server and owned by other team. How can we make sure the javascript event sequence is consistent, ie. onUnload event first, then other javascript function in the current page.