Multiple page loading using frame

Results 1 to 6 of 6

Thread: Multiple page loading using frame

  1. #1 Guest

    Default Multiple page loading using frame

    Frame is bad but i will have to stick to it fer now. anyway I have this unique problem that i hope someone outthere could kindly sheer some lights. I have a frameset of 3, means the explorer will need to load 4 pages all together , the page which contain the frameset, and the frame source files. What I always wanted to do is to actually (using vbscript - embedded script) to allow a particular page to wait ( i know how to determine wether the specific page has finished loaded or not) for the other page to finish loading without having to halt currently loading pages. Specifically i wanted to know how to tell Internet Explorer using vbscript to load all the pages in asynchronously order?

  2. #2
    Join Date
    Dec 1969

    Default i kinda doubt you can do this

    the frame pages basically points to the other pages and i assume it will request them in the order going down the main frame set page.<BR><BR>sorry

  3. #3
    Join Date
    Dec 1969

    Default Why VBScript???

    If you do that, then the pages will only work with MSIE and not with any other browser.<BR><BR>If you use JavaScript, it will work in 99% of browsers.<BR><BR>Anyway, the trick is easy in JS code:<BR><BR>Have the &#060;FRAMESET&#062; declare three JS variables, say <BR><BR>&#060;SCRIPT&#062;<BR>var page1 = 0;<BR>var page2 = 0;<BR>var page3 = 0;<BR>&#060;/SCRIPT&#062;<BR><BR>And then have each of the three pages, when they are loaded, do something like:<BR><BR>&#060;BODY onLoad="parent.page2=1;"&#062;<BR><BR>[each to the appropriate variable]<BR><BR>In whichever you decide is the "main" page, you *also* have the onLoad call a function that does this:<BR><BR>function checkAndGo( )<BR>{<BR>&nbsp; &nbsp; if ( parent.page1 != 0 && parent.page2 != 0 && parent.page3 != 0 ) <BR>&nbsp; &nbsp; &nbsp; &nbsp; goStartThisPage( );<BR>&nbsp; &nbsp; setTimeout( "checkAndGo()", 100 ); // check again in 100 milliseconds<BR>}<BR><BR>So that function essentially just waits until all 3 are loaded before calling the JS function that now starts everything up!<BR><BR>

  4. #4 Guest

    Default RE: Why VBScript??? bcoz It's not gonna be no

    thanks. for the reply about vbscript...

  5. #5

    Default RE: i kinda doubt you can do this


  6. #6
    Join Date
    Dec 1969

    Default Not gonna be no what???

    Actually, except for syntax, that code should work the same in VBS as in JS. That is, instead of<BR><BR>var page1 = 0;<BR><BR>you do<BR><BR>Dim page1<BR>page1 = 0<BR><BR>in the frameset page. Et cetera.<BR><BR>setTimeout is actually a method on window, I believe, so it should work from either VBS or JS.<BR><BR>Personally, I *never* code client-side VBS, so you&#039;re on your own with the translation.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts