Click to See Complete Forum and Search --> : opening a document in a frame


deceeced
11-28-2002, 01:53 PM
Hello,
I am in the process of creating my first site. It is done in a frameset. There are three frames. I have the navigation frame, a main frame and a third frame. The third frame is mainly for pics and stuff. What I am trying to do is have a blank page load into the third frame ( I have the blank page made) whenever a new page loads into the main page. Is there a way to do this? I have tried with the onLoad and some javascipt in the documents for the main window, but I do not know if I can reference the target third window for the blank document to load into. Can anybody help?

Thanks,
Deceeced

cxema
11-28-2002, 07:59 PM
Do you mean that when you open the frameset, the "blank" page opens where the "main" should be; or is that when you click a link, the "blank" one opens in the place of the "main"?

Is there anyway you could post the code of that frameset and your links on the main one?

Perhaps is just a matter of selecting the target frame when you define the links.

Later

deceeced
11-29-2002, 02:12 PM
k, here is my situation.
I have the nested frameset setup like so:
There is a frameset setup horizontally.
There are two horizontal frames.
The top one is used for the navigation bar (NAVIGATION).
The bottom one has a nested frameset in it.
This frameset is setup vertically.
I have a vertical frame that takes up 300px on the left (LEFT).
The rest is taken up by the second vertical frame (RIGHT).

Now, when a user clicks on a link in the navigation bar, the page pops up in the RIGHT frame. However, the LEFT frame does not change.

What I want to happen is:
when a user clicks on a link in the navigation bar (in the NAVIGATION frame), the page they want will load in the main frame (the RIGHT frame), but also, anything in the secondary frame (the LEFT frame) should be cleared by having a blank html document load into it.

I tried using simple javascript with the onLoad event in the documents body tag but to no avail. Any suggestions?

AdamGundry
11-30-2002, 10:05 AM
You need to use javascript in the navigation bar, probably something like this:

<a href="javascript:void(top.navigation.left.location = 'blank.html');void(top.navigation.right.location = 'page1.html');">Go to page1</a>

This would show a hyperlink that, when clicked, displayed "blank.html" in the left frame and "page1.html" in the right frame. You might have to experiment with "top.navigation", as it might be "parent.navigation" or similar, I'm not sure.

Good luck

Adam

Stefan
11-30-2002, 06:16 PM
Originally posted by deceeced
I have a vertical frame that takes up 300px on the left (LEFT).
The rest is taken up by the second vertical frame (RIGHT).


Why not simply use an <iframe> to represent the left or right side and you won't need to rely on JavaScript to navigate on the site...

dibr
12-03-2002, 05:22 PM
Hello,

Why don't you try :

<a href="blankpage.htm" target="mainframe">

You will have standard targets (e.g. _top, _parent,....)
But also (when using frames) topframe, mainframe, leftframe... and so one...

hope i help you.

Gr.

Dirk