top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How do I update two frames at once in HTML/HTML5?

+5 votes
74 views
How do I update two frames at once in HTML/HTML5?
posted Feb 12, 2014 by Muskan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes

f the two frames you want to update are adjacent, you should create one frameset document containing the two frames, and use that instead of the two individual frames. Then, have the 'update' link change that frame. This will result in the two frames being updated.

An example: suppose we have a frameset with three frames, roughly like this:

+----------------------+ <FRAMESET COLS="30%,*">
|       |     Banner   | <FRAME SRC="list.html" NAME="List">
| List  |--------------|   <FRAMESET ROWS="20%,*">
|       |              |   <FRAME SRC="banner.html" NAME="Banner">
|       |    Content   |   <FRAME SRC="content.html" NAME="Content">
|       |              |   </FRAMESET>
+----------------------+ </FRAMESET>

We wish to update both "Banner" and "Content" when a certain link in "List" is followed. To do this, we replace the nested frameset declaration in the above text with a FRAME element pointing to a document that calls the two frames:

<FRAMESET COLS="30%,*">                    
<FRAME SRC="list.html" NAME="List">
<FRAME SRC="right.html" NAME="Right">
</FRAMESET>                                
and the new document calls the two frames:
<FRAMESET ROWS="20%,*">
<FRAME SRC="banner.html" NAME="Banner">
<FRAME SRC="content.html" NAME="Content">
</FRAMESET>

To update both the Banner and the Content frame, all we have to do now is to update the Right frame.

The disadvantage of this solution is that it requires a lot of extra effort and managing several extra documents with just frameset declarations. It also does not work if the frames are not adjacent.

answer Feb 12, 2014 by Amit Kumar Pandey
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...