Solved

Is it possible to set frames equal to each other?

Posted on 2004-10-01
9
148 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
Comment Utility
is the other (non-hidden) frame supposed to be blank until the hidden frame is loaded?
0
 

Author Comment

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

Expert Comment

by:knightEknight
Comment Utility
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
 

Author Comment

by:mkottmann00
Comment Utility
a regular frameset
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 33

Expert Comment

by:knightEknight
Comment Utility
can you show me your frameset code?
0
 

Author Comment

by:mkottmann00
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

17 Experts available now in Live!

Get 1:1 Help Now