Solved

HTML Frames

Posted on 2004-03-30
8
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
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!

 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

718 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