How to force a frame to load prior to others?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vk

    How to force a frame to load prior to others?

    I have a situation where I have 3 frames. The first frame is dynamic
    and contains javascript variables for use throughout the frameset page
    and the other frames.

    Everything works fine...except that the first frame NEEDS to be loaded
    first so that the other pages can access its variables. What happens
    in IE is that the frames load up randomly (or so it seems). So
    sometimes everything blows b/c the first frame did not load first and
    all variables are undefined, etc.

    So...essentiall y, what I'd like to know is...is there any way to force
    a frame to load?...or perhaps some other trick, etc.

    A few things I've tried...
    ....A timer loop after first frame to pause...did NOT work
    ....document.cl ose() and document.open() after first frame...to clear
    cache...did NOT work
    ....I put an alert() after the first frame, and that somehow forces
    things to load in the correct order. But I cannot keep that alert
    there.

    Can anybody suggest anything...PLEA SE...this is killing me...

    Thx in advance...B.

    Here is a snippet of code...

    vOutput = '<frameset framespacing="0 " border="0"
    rows="0,80,98%, 34,0" frameborder="0" >\n';
    document.writel n(vOutput);
    vOutput = ' <frame marginheight="0 " scrolling="no" noresize
    marginwidth="0" name="variables " target="variabl es" src="' + vModId +
    '/Variables.htm"> \n';
    document.writel n(vOutput);
    //Need to pause here

    vOutput = ' <frame marginheight="0 " scrolling="no" noresize
    marginwidth="0" name="header" target="main" src="header.htm ">\n';
    document.writel n(vOutput);
    vOutput = ' <frame marginheight="0 " scrolling="auto " noresize
    marginwidth="0" name="main" target="main" src="main.htm"> \n';
    document.writel n(vOutput);
    vOutput = ' <frame marginheight="0 " scrolling="no" noresize
    marginwidth="0" name="footer" target="main" src="footer.htm ">\n';
    document.writel n(vOutput);
    vOutput = ' <frame marginheight="0 " scrolling="no" noresize
    marginwidth="0" name="ping" target="ping" src="../../Refresh.asp">\n ';
    document.writel n(vOutput);
    vOutput = ' <noframes><body ><p>This page uses frames, but your
    browser doesn&#39;t support them.</p></body></noframes>\n';
    document.writel n(vOutput);
    vOutput = '</frameset>\n';
    document.writel n(vOutput);
  • Fred Serry

    #2
    Re: How to force a frame to load prior to others?...


    "vk" <vkloc@hotmail. com> schreef in bericht
    news:e28dfc2.03 06261018.594b75 35@posting.goog le.com...[color=blue]
    > I have a situation where I have 3 frames. The first frame is dynamic
    > and contains javascript variables for use throughout the frameset page
    > and the other frames.
    >
    > Everything works fine...except that the first frame NEEDS to be loaded
    > first so that the other pages can access its variables. What happens
    > in IE is that the frames load up randomly (or so it seems). So
    > sometimes everything blows b/c the first frame did not load first and
    > all variables are undefined, etc.
    >
    > So...essentiall y, what I'd like to know is...is there any way to force
    > a frame to load?...or perhaps some other trick, etc.
    >
    > A few things I've tried...
    > ...A timer loop after first frame to pause...did NOT work
    > ...document.clo se() and document.open() after first frame...to clear
    > cache...did NOT work
    > ...I put an alert() after the first frame, and that somehow forces
    > things to load in the correct order. But I cannot keep that alert
    > there.
    >
    > Can anybody suggest anything...PLEA SE...this is killing me...
    >
    > Thx in advance...B.
    >
    > Here is a snippet of code...[/color]


    Hi,

    Why don't you load the other frames from variables.htm, like:

    <body onload='fillFra mes'>

    and:

    function fillFrames() {
    parent.header.l ocation="header .htm"
    parent.main.loc ation="main.htm "

    etc..

    Then, in the frameset, leave the src attr empty or about:blank

    Fred


    Comment

    • vk

      #3
      Re: How to force a frame to load prior to others?...

      "Fred Serry" <fred.NOSPAM.se rry@planet.nl> wrote in message news:<bdfec3$sl 9ao$1@ID-108377.news.dfn cis.de>...[color=blue]
      > "vk" <vkloc@hotmail. com> schreef in bericht
      > news:e28dfc2.03 06261018.594b75 35@posting.goog le.com...[color=green]
      > > I have a situation where I have 3 frames. The first frame is dynamic
      > > and contains javascript variables for use throughout the frameset page
      > > and the other frames.
      > >
      > > Everything works fine...except that the first frame NEEDS to be loaded
      > > first so that the other pages can access its variables. What happens
      > > in IE is that the frames load up randomly (or so it seems). So
      > > sometimes everything blows b/c the first frame did not load first and
      > > all variables are undefined, etc.
      > >
      > > So...essentiall y, what I'd like to know is...is there any way to force
      > > a frame to load?...or perhaps some other trick, etc.
      > >
      > > A few things I've tried...
      > > ...A timer loop after first frame to pause...did NOT work
      > > ...document.clo se() and document.open() after first frame...to clear
      > > cache...did NOT work
      > > ...I put an alert() after the first frame, and that somehow forces
      > > things to load in the correct order. But I cannot keep that alert
      > > there.
      > >
      > > Can anybody suggest anything...PLEA SE...this is killing me...
      > >
      > > Thx in advance...B.
      > >
      > > Here is a snippet of code...[/color]
      >
      >
      > Hi,
      >
      > Why don't you load the other frames from variables.htm, like:
      >
      > <body onload='fillFra mes'>
      >
      > and:
      >
      > function fillFrames() {
      > parent.header.l ocation="header .htm"
      > parent.main.loc ation="main.htm "
      >
      > etc..
      >
      > Then, in the frameset, leave the src attr empty or about:blank
      >
      > Fred[/color]

      Worked !!

      Clever...never thought of that :(
      It definately ensures the correct loading order.

      Thx Fred...

      Cheers...vk.

      Comment

      Working...