?
Solved

HTML Frames

Posted on 2004-03-30
8
Medium Priority
?
250 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 2000 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
Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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.
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:
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…
Suggested Courses

771 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