473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

html frame

Hi,

how do I switch of frames?
I have 2 frames on a page. When I click a specific reference I want that
page to load in the same browserwindow without frames. How? What happens now
is that the page is loaded in one of the frames.

Thanx

Frank
Jul 20 '05 #1
5 2507
Frank wrote:
I have 2 frames on a page.
Oh dear: http://david.us-lot.org/www/frames/
When I click a specific reference I want that page to load in the same
browserwindow without frames.


That has nothing to do with JavaScript.

http://www.w3.org/TR/html4/present/f...ml#adef-target
http://www.w3.org/TR/html4/types.html#h-6.16

--
David Dorward http://david.us-lot.org/
Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
it'll stop pop-up ads? -- Dork Tower
Jul 20 '05 #2
On 03.8.3 5:19 PM, Frank wrote:
This seems to work:
<script language="JavaScript"><!--
if (self != top)
{
if (document.images)
top.location.replace(window.location.href);
else
top.location.href = window.location.href;
}
// --></script>


What?? You don't need Javascript to do this. Just add 'target="_top"' to the
link.

<A href="blah.html" target="_top">

(Although as David mentioned, you're probably better off without frames)

Phil

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 20 '05 #3

"Philip Ronan" <ph***********@virgin.net> wrote in message
news:BB52F873.17615%ph***********@virgin.net...
On 03.8.3 5:19 PM, Frank wrote:
This seems to work:
<script language="JavaScript"><!--
if (self != top)
{
if (document.images)
top.location.replace(window.location.href);
else
top.location.href = window.location.href;
}
// --></script>
What?? You don't need Javascript to do this. Just add 'target="_top"' to

the link.

<A href="blah.html" target="_top">

(Although as David mentioned, you're probably better off without frames)

Phil

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)

Maybe this works but I would have to put it in every href. The javascript I
only have to put once in the called html file.
Frank
Jul 20 '05 #4
Frank wrote:
Maybe this works but I would have to put it in every href.
There's this clever little thing called search and replace.
The javascript I only have to put once in the called html file.


And not have it work for those users who turn off JS, and to have it load a
page twice for at least some of those who do.

Not using frames in the first place is easier of course.

--
David Dorward http://david.us-lot.org/
Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
it'll stop pop-up ads? -- Dork Tower
Jul 20 '05 #5
Frank wrote on 03 aug 2003 in comp.lang.javascript:
Maybe this works but I would have to put it in every href. The
javascript I only have to put once in the called html file.


Solution, put in the <head>:

<base target="_top">

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
3
by: Jan Plastenjak | last post by:
This question is about html. I have this: <frameset rows="90%,10%" frameborder="NO" border="0" framespacing="0" cols="1"> <frame name="topFrame" noresize src="c:\bpp.xml"> <frame name="bottom" ...
1
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
6
by: Vanitha | last post by:
Hi All, I am developing a Web based application for an embedded target, using BOA webserver. I need to return some values to the HTML client. I am using CGI-C to extract the values sent by...
14
by: Alex Molochnikov | last post by:
Is there any way to embed the HTML code inside FRAMESET? Something like this: <frameset cols="50%,*"> <frame src=" ... HTML code for the frame ... "> <frame src="Frame2.html" name="main">...
3
by: Jofio | last post by:
In my frame based page, I have a hyperlink in the top frame called "header" which, when I click, should make two different pages to be loaded and displayed into two different frames, namely...
0
by: Tapak | last post by:
Hi, I am having a problem with the session inside the html frame. I created a html frame and host it on (IIS 5.0) a different server where I host all my aspx file (IIS 6.0). Every time, I view...
6
by: Ashok | last post by:
Hi, I am starting a new project to build a software product using APS.NET 2.0. In past I have used "frameset" and "frame" to build pages. My current requirements I have coded using frameset and...
3
by: Axel Gallus | last post by:
I wrote a javascript function which should return the html code between a frame's body tag: function load_frame_as_string( Framename ) { var Frame =...
1
by: jd | last post by:
Hi guys, I'm trying to create an HTML page that contains two frames. The bottom frame should simply be some website, but the top frame needs to have a close link to kill the window. I tried calling...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.