...

View Full Version : Frames!



DR.Wong
01-31-2005, 02:30 PM
How do you Exit a page in a frame, leaving only the desired page and fullscreen?

Here is 3 example pages, just open the index page to see what I mean.
(files should be changed to '.htm')

Can Fix your Chopstick!
*Dr.Wong

_Aerospace_Eng_
01-31-2005, 09:04 PM
how would u want frame 2 to be the only remainingg frame, by a link? or do want it to where frame 2 can never be viewed in a frameset? or do u want it to where once u click a link it opens in place of the frameset?

DR.Wong
02-01-2005, 01:18 PM
Number 3!
I would like it to open in place of the frame set.
I find that for some reason, If you insert a jump menu in page 2, clicking on the Go or submit button makes page 1 Disapear!

That is the effect I am Looking for.
(of course the link to close page 1 must be in page 1)

Can Fix Your Chopstick!
*DR.Wong :)

_Aerospace_Eng_
02-01-2005, 03:44 PM
okay u can use javascript which would be put in the page that u link to, in between the head tags

<script type="text/javascript">
<!-- Begin
if (window != top) top.location.href = location.href;
// End -->
</script>
or i think if you make the target of the link _top, it should display over the frameset

<a href="yourlink.html" target="_top">link</a>

DR.Wong
02-01-2005, 04:03 PM
Right, your script is acting how I want it to, but in the first set of code (the longer one) page 2 closes leaving page 1 open. (wrong way around) and in the shorter one, you may only navigate to one page. Now I forgot to tell you this, but I am using the top frame as a navigation bar. Clicking a link in the top frame changes the page in the bottom frame. So, I have to be able to close the top frame and leave the bottom frame just as it is.

(otherwise the user would navigate away from the page he/she is viewing)

See my Problem?

Can fix you Chopstick!
*DR.Wong :)

_Aerospace_Eng_
02-01-2005, 06:20 PM
okay in the page that u link to from you navigation frame which should open in the bottom frame put in this code in between its head tags, so lets say in the top frame u had a link that went to main.html that should open in the bottom frame, the beginning of your main.html page would look something like this

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>main.html</title>
<script type="text/javascript">
<!-- Begin
if (window != top) top.location.href = location.href;
// End -->
</script>
</head>
<body>
your content here
</body>
</html>
that should make main.html breakout of the frameset and be the only page remaining

DR.Wong
02-01-2005, 07:14 PM
Greeaat!

That works wonders! :)

Thank you Sooooo much! :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum