Solved

HTML Frames

Posted on 2004-03-30
8
247 Views
Last Modified: 2006-11-17
I have 2 html frames.  I want the left hand side one to finish loading before the right hand side one begins to load.  Is this possible?

Thanks
0
Comment
Question by:barnetjeb
8 Comments
 
LVL 10

Expert Comment

by:D_M_D
ID: 10713279
Just create a blank html page with the following code, put this page as the right hand page in your frameset.  It will redirect to the real page with content.  Just change the time if you need to.  It's set at 5 seconds.  Also change the url to point to the page you want to load in the right hand frame.

<!-- Blank.html -->
<html><head>
<META HTTP-EQUIV="refresh" content="5;URL=http://www.yoursite.com/yourpage.htm">
</head>
<body></body></html>

--------
D_M_D
0
 

Author Comment

by:barnetjeb
ID: 10713618
Is there no way I can say load this.  Once loaded load the right hand frame?  I don't want to specify a time.

Thanks for the suggestion.
0
 
LVL 8

Accepted Solution

by:
HaydnH earned 500 total points
ID: 10713655
You would be better loading the right hand frame from the left hand frames onLoad event, for example, the 3 files would look like:

index.html:
-------------
<HTML>
  <HEAD>
    <TITLE>Load left then right frame example</TITLE>
  </HEAD>

  <FRAMESET FRAMESPACING="0" BORDER="0" COLS="200,*" FRAMEBORDER="0">
    <FRAME NAME="contents" SRC="./leftFrame.html" SCROLLING="auto" TARGET="main" NORESIZE>
    <FRAME NAME="main" SRC="" TARGET="_self">

    <NOFRAMES>
    </NOFRAMES>
  </FRAMESET>
</HTML>


leftFrame.html
-----------------
<HTML>
  <HEAD>
    <TITLE>The left frame</TITLE>
  </HEAD>

  <BODY onLoad="parent.frames['main'].location.href='./rightFrame.html'">
    This is the left frame!
  </BODY>
</HTML>


rightFrame.html
-------------------
<HTML>
  <HEAD>
    <TITLE>The right frame</TITLE>
  </HEAD>

  <BODY>
    This is the right frame!
  </BODY>
</HTML>


Regards,

Haydn.
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 8

Expert Comment

by:HaydnH
ID: 10713663
"Is there no way I can say load this.  Once loaded load the right hand frame?"

Yes there is, see my last post.

Haydn.
0
 
LVL 14

Expert Comment

by:dfu23
ID: 10713680
<html>
      <frameset cols="200,*" border="0" id="frames">
            <frame id="frame1" src="frame1.htm" onload="document.getElementById('frame2').src='frame2.htm';">
            <frame id="frame2" src="about:blank">
      </frameset>
</html>
0
 

Author Comment

by:barnetjeb
ID: 10713754
So onload will fire only after the loading has completed?

Thanks for the input guys.  This is really helpful!!
0
 
LVL 8

Expert Comment

by:HaydnH
ID: 10713790
"So onload will fire only after the loading has completed?"

Yup, thats correct.
0
 

Author Comment

by:barnetjeb
ID: 10723242
Perfect thank you
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question