From: Eustace on
I have a webpage with 2 frames (sidebar, content). The link is in the
content frame.

How can I make a link open in the whole window?

If I use

<a href="http://www.link.html" onclick="window.open (this.href,
'content'); return false">Link</a>

it will of course open in the content frame. I do not want this.

If I use

<a href="http://www.link.html" onclick="window.open (this.href, '');
return false">Link</a>

clicking will open another browser window or tab. That's better, but not
exactly what I want.

I want I make the link open in the same window, not inside the content
frame or in another window. How do I do this?

Thanks,

emf

--
It ain't THAT, babe! - A radical reinterpretation
https://files.nyu.edu/emf202/public/bd/itaintmebabe.html
From: Scott Sauyet on
On Mar 2, 5:33 pm, Eustace <emf...(a)gmail.ccom> wrote:
> I have a webpage with 2 frames (sidebar, content). The link is in the
> content frame.
>
> How can I make a link open in the whole window?

http://www.google.com/search?q=link+target
From: Thomas 'PointedEars' Lahn on
Scott Sauyet wrote:

> On Mar 2, 5:33 pm, Eustace <emf...(a)gmail.ccom> wrote:
>> I have a webpage with 2 frames (sidebar, content). The link is in the
>> content frame.
>>
>> How can I make a link open in the whole window?
>
> http://www.google.com/search?q=link+target

Since they have asked here, it might be better to point out that whenever
there is no Window instance with the specified name (i.e. no `name'
property value of a Window object equals that of the second argument of
window.open()), a new Window is supposed to be created, and that a new tab
instead of a new window is less likely to be opened if the dimensions of
the window have been provided. Therefore,

window.open("...", "w" + (new Date()).getTime(),
"width=" + Math.min(640, screen.availWidth)
+ ",height=" + Math.min(480, screen.availHeight)
+ ",menubar,toolbar,location,directories,status"
+ ",resizable,scrollbars,titlebar,toolbars");

could provide what the OP is looking for, while that is less likely with
the `target' attribute. However one should fully understand and weigh the
the consequences of such a call as described in e.g.
<https://developer.mozilla.org/En/DOM/Window.open>.


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
From: Evertjan. on
Eustace wrote on 02 mrt 2010 in comp.lang.javascript:

> I have a webpage with 2 frames (sidebar, content). The link is in the
> content frame.
>
> How can I make a link open in the whole window?
>
> If I use
>
> <a href="http://www.link.html" onclick="window.open (this.href,
> 'content'); return false">Link</a>

"window.open( this.href , '_top', '');return false;"



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Eustace on
On 2010-03-02 18:22 Evertjan. wrote:
> Eustace wrote on 02 mrt 2010 in comp.lang.javascript:
>
>> I have a webpage with 2 frames (sidebar, content). The link is in the
>> content frame.
>>
>> How can I make a link open in the whole window?
>>
>> If I use
>>
>> <a href="http://www.link.html" onclick="window.open (this.href,
>> 'content'); return false">Link</a>
>
> "window.open( this.href , '_top', '');return false;"

Thanks a lot. I had googled for an answer before posting but had not
come close to finding the answer.

emf

--
Date Calculator with all-purpose JS code
https://files.nyu.edu/emf202/public/js/datecalc.html