BootNic wrote on 23 jun 2005 in comp.lang.javascript
:
"Tim Streater" <ti**********@dante.org.uk> wrote:
news:ti********************************@individual .net....
I have, as it might be, this in a frame:
<a href="mystuff.html">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.href = "mystuff.html"
instead of:
window.location.href = "mystuff.html"
Thanks,
<a href="mystuff.html" target="_parent">Click here</a>
<a href="mystuff.html" target="_top">Click 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)