/    Sign up×
Community /Pin to ProfileBookmark

opening a document in a frame

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

to post a comment
Full-stack Developer

5 Comments(s)

Copy linkTweet thisAlerts:
@cxemaNov 29.2002 — 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
Copy linkTweet thisAlerts:
@deceecedauthorNov 29.2002 — 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?
Copy linkTweet thisAlerts:
@AdamGundryNov 30.2002 — 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
Copy linkTweet thisAlerts:
@StefanNov 30.2002 — [i]Originally posted by deceeced [/i]

I have a vertical frame that takes up 300px on the left (LEFT).

The rest is taken up by the second vertical frame (RIGHT).
[/QUOTE]


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...
Copy linkTweet thisAlerts:
@dibrDec 03.2002 — 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
×

Success!

Help @deceeced spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...