Solved

Is it possible to set frames equal to each other?

Posted on 2004-10-01
9
151 Views
Last Modified: 2010-04-09
I have a page with a couple of frames, one of them is hidden.  What I need to do is when the hidden frame get populated, write that information to the other frame.  Is there something that I could do with the onload event of the hidden frame's page?  I don't want to just change the url from the non-hidden page.

Thanks,
    Mike
0
Comment
Question by:mkottmann00
  • 4
  • 3
  • 2
9 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 12200526
is the other (non-hidden) frame supposed to be blank until the hidden frame is loaded?
0
 

Author Comment

by:mkottmann00
ID: 12200589
It's basically blank, I'll probably put some type of "processing" term on it.
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12200616
ok ... I suggest that when the hidden frame is loaded, you hide the non-hidden frame, and un-hide the hidden one.
Stand by, I'll code it up.

Are you using iframes or a regular frameset?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:mkottmann00
ID: 12200660
a regular frameset
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12200680
can you show me your frameset code?
0
 

Author Comment

by:mkottmann00
ID: 12200727
I actually have more than one frameset.  I should have stated that above, but I just wanted a general idea of how to do it.  The mainFrame is the one that will contain the "processing" page, while the hidden will be the hidden frame.


<FRAMESET border=0 frameSpacing=0 rows=125,* frameBorder=NO cols=*>
      <FRAME name="topFrame" src="topPage.jsp" noResize scrolling=no>
            <FRAMESET border=0 frameSpacing=0 rows=* frameBorder=NO cols=10,129,*,10,0>
                  <FRAME src="blankSide.html" noResize scrolling=no>
                  <FRAME name="leftFrame" src="menu.html" noResize scrolling=no>
                  <FRAME name="mainFrame" src="body.html" noResize>
                                                <FRAME src="blankSide.html" noResize scrolling=no>
                                                <FRAME name="hidden" src="blankSide.html" scrolling=auto>
                                </FRAMESET>
</FRAMESET>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12202574
sorry, i have been pulled away at work and I won't be able to get to this ... and in fact, the more I think about it the less certain I am that it can be easily done with a regular frameset.
0
 
LVL 1

Accepted Solution

by:
MMabatig earned 250 total points
ID: 12205449
Not sure idf this is the way you want to go, but you can put a <div> in the non-hidden layer and dynamically populate it using Javascript:

function changeLayerContent(divName, content)
{
      var obj;
      if (navigator.appName == "Netscape") {
            // If the brower is Netscape
            obj = document.getElementByID(divName);
      } else {
            // Else, assuming IE
            obj = document.all(divName);
      }

      // If Object 'divName' cannot be found return false
      if(obj == null) return false;

      if ((navigator.appName == "Netscape") && parseInt(navigator.appVersion)==4) {
            // If the brower is netscape version 4
            obj.document.open();
            obj.document.write(content);
            obj.document.close();
      } else {
            // If the browser is IE or Netscape (Other than ver 4)
            if(obj == null) return false;
            obj.innerHTML = content;
      }
}

Haven't fully tested it, but Hope it helps.
-Mark
0
 
LVL 1

Expert Comment

by:MMabatig
ID: 12205459
Let me elaborate a bit.  It should be possible to access and alter a <div> tag in another frameset by placing the afunction in my previous post in the non-hidden frame, and calling:

 parent.framename.changeLayerContent(divname, content);

from the hidden frame.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Select case on click 3 19
Accessing specific element - DOM PHP HTML 8 34
Filktering Alphabetically 8 29
HTML Anchor Link Problem 3 35
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

809 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