• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

onUnload Events in IE having trouble

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there is no way to guarentee the loading of frames. One page may load more slowly since it may be larger. Plus if your website sits on two different servers you are going to run into some trouble if you ever want to do communication between the two.

Eric
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic