473,811 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2520
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="JavaS cript"><!--
if (self != top)
{
if (document.image s)
top.location.re place(window.lo cation.href);
else
top.location.hr ef = 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***********@v irgin.net
(Please remove the "z"s if replying by email)
Jul 20 '05 #3

"Philip Ronan" <ph***********@ virgin.net> wrote in message
news:BB52F873.1 7615%ph******** ***@virgin.net. ..
On 03.8.3 5:19 PM, Frank wrote:
This seems to work:
<script language="JavaS cript"><!--
if (self != top)
{
if (document.image s)
top.location.re place(window.lo cation.href);
else
top.location.hr ef = 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***********@v irgin.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.javas cript:
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
9878
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 ********************************** package Celcom.Client;
3
2118
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" scrolling="NO" noresize src="c:\btn.htm"> </frameset> Is there a way to assign html code to frames "in code", not to have to specify src property? Something like:
1
2430
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 GENERATED BY FUNCTION. Here'e the point: I'm writing a simple website for showing my photographs. It has a central page with many links (as many as galleries are).
6
2268
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 the client from the server. I dont want to generate the entire HTML page each time from the server.'cos i need to refresh the status less than a second..
14
6544
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"> </frameset><noframes></noframes> I tried using a Javascript function that returns the HTML text, as in the following code:
3
1595
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 "thumbnails" frame and "main" frame simultaneously. My framed page is defined as follows: <frameset rows="15%,*,15%"> <frame src="headerWelcome.html" name="header" /> frameset cols="20%,*,20%">
0
1902
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 the html frame, the session of an aspx file inside the frame will be lost and the page will generate an error. However, this error will not happen when I open the page outside the html frame. In addition, if the html frame file is hosted on the...
6
1661
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 frame like code below. My question is, because this is a new development is it good to use frameset and frame or I can use some thing better. I am looking for expert suggestions on my code below is this a good way to move or I should not use...
3
1906
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 = document.getElementsByName(Framename); var Frame_document = Frame.document; var Frame_Body = Frame.document.getElementsByTagName("body");
1
7639
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 'document.window.close()' from the child frame, but without success. I then tried putting the 'close()' call in the parent page and calling it from the child, but still without success. Can anyone take a look at the HTML/Javascript below and...
0
9727
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.