Oi! Html question...

X

xenon2000

Guest
Using frames... I have five frames in index.htm; the main one in the middle, and four more small ones surrounding it. The site navigates mainly from inside the main frame, but I like the outside borders there anyway...
OK, in the bottom frame, I want a link which will eliminate all the frames when clicked on, take the page that's currently in the main central frame, and re-load it in the full browser window, without frames.

Can anyone help me in assisting how it's done (or if it's possible)?

And also, I have another simpler question: What's the value you add to the <a> (link) tag to make the linked url pop up in a new/different window?

Thanks
 
O

old.Jas

Guest
Using frames
Theres your first mistake ;) Frames suck ass, for many reasons

Right - in answer to your question. You need to make a link with a target of top -

Code:
<a href="maincentralframe.htm" target="_top">
 
O

old.Jas

Guest
Ah - on rereading your question I think I got the wrong end of the stick. I guess the page in the main content frame is going to be changing and you want that to break the frames and goto that page.

In that case - no it is not possible, unless the link is in the main content frame. In which case the link would simply be -

Code:
<a href="#" target="_top">

Javascript would do the job - but it can't tell the contents of a frame from another frame due to security problems.
 
X

xenon2000

Guest
Hmm... In any case the link I'd want would be javascript that refreshes the page; I can't remember it offhand, but I'm sure it's on one of ie5's error pages somewhere... you know, "Click the Refresh button, or try again later" :)

If I were to target the link at the main frame with a refresh link, would that refresh the main frame? And I was sure there was an option to add to the link tag so you could remove frames when going there.


Anyway, the site is at college (yes, the whole thing's an assignment, I wouldn't use frames normally :)) and I'm at home now... I'll try remaking it in simple form so I can test your answer out and maybe give more useful feedback as to whether it worked or not...
 
X

xenon2000

Guest
OK, that last post was bollocks.

I've just tried it and target="_top" gets rid of the frames, but then I can't use targetting to get the contents of the main frame :/ I see where you're at now.

And if I wanted to add Javascript to make the link in the bottom frame go to whatever page the main frame was at, then it wouldn't be possible because java can't tell contents of one frame from another? Aww :(


So anyway, if anyone could think of a different approach that would help; I'll go through the brief;
The main site will link (within the main frame) to a few external sites, like BW for instance, so users can browse the games section for a bit (the site is gaming related) but there'll be a link on the top frame to get back to the main homepage at any time, should the user wish to return without clicking "back" repeateadly. BUT, I kinda need an option on one of the outside frames that gets rid of them, for when the user finishes with the site and wants to browse fullscreen again.

Yeah. What's the answer to my second question anyway? :)
 
O

old.Jas

Guest
Hum... I have been thinking about this. I guess you could update some kinda global variable (containing the content page's url)from the content page whenever it is loaded. Then you could set the link in the bottom frame to goto that url with a target of top.
 
O

old.vbmot

Guest
ok for the last time...i didn't understand your problem at the first...but now i do! the script you need to use is the following, and instead of "examp" you should put the name of the frame you want to be opened.

If you are using this code in your framespage:
<frame src="example.html" name="examp" id="examp">

Use the following link:
link text
 

Users who are viewing this thread

Top Bottom