Solved

HTML Frames

Posted on 2004-03-30
8
241 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 8

Expert Comment

by:HaydnH
Comment Utility
"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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 14

Expert Comment

by:dfu23
Comment Utility
<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
Comment Utility
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
Comment Utility
"So onload will fire only after the loading has completed?"

Yup, thats correct.
0
 

Author Comment

by:barnetjeb
Comment Utility
Perfect thank you
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
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:
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now