473,799 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I get a link loaded in the window, not frame?

I have, as it might be, this in a frame:

<a href="mystuff.h tml">Click here</a>

When I click the link, it loads mystuff.html into the frame, whereas
what I want is to replace the whole window contents. How can I do this
while still using a link? What I want in effect is for clicking to do:

top.location.hr ef = "mystuff.ht ml"

instead of:

window.location .href = "mystuff.ht ml"

Thanks,

-- tim
Jul 23 '05 #1
3 3505
> "Tim Streater" <ti**********@d ante.org.uk> wrote:
news:ti******** *************** *********@indiv idual.net....

I have, as it might be, this in a frame:

<a href="mystuff.h tml">Click here</a>

When I click the link, it loads mystuff.html into the frame, whereas
what I want is to replace the whole window contents. How can I do this
while still using a link? What I want in effect is for clicking to do:

top.location.hr ef = "mystuff.ht ml"

instead of:

window.location .href = "mystuff.ht ml"

Thanks,


<a href="mystuff.h tml" target="_parent ">Click here</a>
--
BootNic Thursday, June 23, 2005 2:27 PM

Thirty-five is when you finally get your head together and your body starts falling apart.
*Caryn Leschen*
Jul 23 '05 #2
BootNic wrote on 23 jun 2005 in comp.lang.javas cript:
"Tim Streater" <ti**********@d ante.org.uk> wrote:
news:ti******** *************** *********@indiv idual.net....

I have, as it might be, this in a frame:

<a href="mystuff.h tml">Click here</a>

When I click the link, it loads mystuff.html into the frame, whereas
what I want is to replace the whole window contents. How can I do this
while still using a link? What I want in effect is for clicking to do:

top.location.hr ef = "mystuff.ht ml"

instead of:

window.location .href = "mystuff.ht ml"

Thanks,


<a href="mystuff.h tml" target="_parent ">Click here</a>


<a href="mystuff.h tml" target="_top">C lick here</a>
<http://www.w3.org/TR/NOTE-layout>:

target: _blank
Loads the linked document into a new blank window. This generally
provides the same navigation controls as other browser windows. Some
users will want to be able to disable this behaviour via a browser
preference setting.

target: _popup
Loads the linked document into a pop-up window. This is similar to
"_blank" except that pop-up windows are generally borderless and
automatically sized to match the document content, disappearing when
clicked.

target: _self
Loads the linked document into the same frame as the anchor that was
clicked on. This is useful for overriding an inherited target value.

target: _parent
Loads the linked document into the immediate parent frame of the frame
containing the clicked anchor. This defaults to acting like "_self" when
the clicked anchor isn't contained by a frame (i.e. its directly part of
the page).

target: _top
Loads the linked document into the full extent of the window. This acts
like "_self" when the clicked anchor isn't contained by a frame (i.e. its
directly part of the page).

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #3
In article <Xn************ *******@194.109 .133.242>,
"Evertjan." <ex************ **@interxnl.net > wrote:
BootNic wrote on 23 jun 2005 in comp.lang.javas cript:
"Tim Streater" <ti**********@d ante.org.uk> wrote:
news:ti******** *************** *********@indiv idual.net....

I have, as it might be, this in a frame:

<a href="mystuff.h tml">Click here</a>

When I click the link, it loads mystuff.html into the frame, whereas
what I want is to replace the whole window contents. How can I do this
while still using a link? What I want in effect is for clicking to do:

top.location.hr ef = "mystuff.ht ml"

instead of:

window.location .href = "mystuff.ht ml"

Thanks,


<a href="mystuff.h tml" target="_parent ">Click here</a>


<a href="mystuff.h tml" target="_top">C lick here</a>


[snip]

Thanks guys, that's the reference I needed.

-- tim
Jul 23 '05 #4

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

Similar topics

1
3063
by: Unregistered | last post by:
I'm making an Intranet site for someone who is not very familiar wit making websites, thus I would like to make it as simple as possible fo her when she needs to update it. The intranet site uses frames - one menu frame that is always present and one frame into which the content is loaded. The intranet sit features many, many links to both internal and external pages - i internal pages within the intranet and external pages on the...
6
5167
by: foldface | last post by:
Hi I think from looking into google newsgroups history that you can't do this, however can someone confirm that: Using IE6 Can you load a web page (say www.google.co.uk) Then move to a web page with 2 frames, the centre frame containing the last page visited, in this case google? I get the impression you can do this using netscape via history
1
2092
by: Aki | last post by:
Hi! I've been trying to create a home link in a document that is shown in a frameset of two frames. My aim is to show the first documents that were shown in the frames when the frameset was loaded the first time. The link works perfectly in NN4.5 and 7.1, but IE6 and Opera7 are causing headaches. I've tried to do the link with the following script:
2
1538
by: Tom Jordan | last post by:
Hi all, Ok, could do with some advice on this. I've written a script in ASP for a client so they can compose HTML newsletters and include various products from the online database. I didn't create the original site, which is nicely done but sadly all done in frames. Now the problem, in the body of the email I NEED to link to various internal pages of the website. I know this isn't
6
2835
by: Tom Braun | last post by:
Hello! My first post here... I need to monitor if someone clicked on some (any) link in a subframe. Due to certain restrictions, the only place I can put some JavaScript is in the main (frameset) page, though. It appears you can do somehing like document.onClick = blah to ensure that the function blah is called when someone clicks on a link in the
4
28011
by: christine.nguyen | last post by:
Hello, Here's the deal. I have an html page that contains an iframe. This iframe has an id that is unknown to me. This iframe also has test.html as it's source. Within test.html runs some javascript. Within this javascript that runs in test.html, I want to obtain the id of the iframe that loaded test.html in the first place. Is this possible?? I have no control over the iframe at all. The iframe will be loaded on some random html...
6
2246
by: zino | last post by:
my web application consist of 3 frames :top, left and right, and I use form authentication to authenticate users in ASP.NET 1. the right frame is where the data is displayed I set the default page (as it's required by VS) to some of my pages (default.aspx) there is somewhere in the application where an e-mail is sent to some users containing a url with parameters needed by the page (pageX.aspx) to query the database and return the result to...
7
2247
by: shocron | last post by:
problem: input values not recognized in dinamicly loaded IFRAMEs here is the thing I have a parent window that has an IFRAME I then load a diffrent page into the IFRAME that contains an input when I try to access - iFrm.document.all.value i get an error saying that - "value is null or not an object" I tryed checking to make sure the page is fully loaded using:
1
4532
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The parent window name is "main". A made a link like this in the child-site: <a href="new_address.html" target="main" class="about" onclick="javascript:main.location='new_address.html';self.close();"> change and close </a>
0
9688
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
9546
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
10268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10247
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9079
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...
1
7571
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
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...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3762
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.