472,145 Members | 1,498 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

code to popup link in new browser window

zn
How can I cause a link on a page to open up a new browser window when the
link is clicked on? I've noticed javascript code sometimes when I try to
right-click a link and open it in another window.

Is there a way to use straight HTML to cause a link to open a new browser
window?

Thanks.
Jul 23 '05 #1
13 5696
In article <Xn*******************************@216.196.97.131> , zn
(zn@zn122.edu.invalid) dropped a +5 bundle of words...
How can I cause a link on a page to open up a new browser window when the
link is clicked on? I've noticed javascript code sometimes when I try to
right-click a link and open it in another window.

Is there a way to use straight HTML to cause a link to open a new browser
window?


target=_blank

--
Starshine Moonbeam
mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM



Jul 23 '05 #2
"zn" wrote in comp.infosystems.www.authoring.html:
How can I cause a link on a page to open up a new browser window when the
link is clicked on?


It depends on your browser, but usually it's right-click and then
select "Open in New Window".

I'm sure you don't mean to ask how to write a Web page that will open
its link in a new window, because that is evil and anti-user. (Think
back to how often you've been annoyed by windows opening up unasked,
and don't do that to your visitors.)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Jul 23 '05 #3
zn
Stan Brown <th************@fastmail.fm> wrote in
news:MP************************@news.odyssey.net:
"zn" wrote in comp.infosystems.www.authoring.html:
How can I cause a link on a page to open up a new browser window when
the link is clicked on?


It depends on your browser, but usually it's right-click and then
select "Open in New Window".

I'm sure you don't mean to ask how to write a Web page that will open
its link in a new window, because that is evil and anti-user. (Think
back to how often you've been annoyed by windows opening up unasked,
and don't do that to your visitors.)


Once I read up about the command, I realized the connection with the
dreaded pop-up windows, and also that some anti-pop programs would disable
the feature, so I came to my senses.

What I wanted to do was keep the reader on one page but give them the
option to look at an associated reference page quickly without disrupting
where they were (I guess like a basic popup window). But is sounds like
it'll just cause more aggravation than cause good.
Jul 23 '05 #4
On Sun, 02 Jan 2005 21:05:18 -0600, zn <zn@zn122.edu.invalid> wrote:
How can I cause a link on a page to open up a new browser window when the
link is clicked on? I've noticed javascript code sometimes when I try to
right-click a link and open it in another window.
I hate that too. That is annoying, dumb and wrong.
Is there a way to use straight HTML to cause a link to open a new browser
window?


Yes, but you really don't need a new window.
Jul 23 '05 #5
On Sun, 02 Jan 2005 23:14:18 -0600, zn <zn@zn122.edu.invalid> wrote:
Once I read up about the command,
What "command"?
I realized the connection with the
dreaded pop-up windows, and also that some anti-pop programs would
disable
the feature, so I came to my senses.

What I wanted to do was keep the reader on one page but give them the
option to look at an associated reference page quickly without disrupting
where they were (I guess like a basic popup window). But is sounds like
it'll just cause more aggravation than cause good.


I agree. I can open new windows all I like. So can your user, if it's of
any benefit.

Jul 23 '05 #6
In message <Xn******************************@216.196.97.131 >, zn
<zn@zn122.edu.invalid> writes
Stan Brown <th************@fastmail.fm> wrote in
news:MP************************@news.odyssey.ne t:
"zn" wrote in comp.infosystems.www.authoring.html:
How can I cause a link on a page to open up a new browser window when
the link is clicked on?


It depends on your browser, but usually it's right-click and then
select "Open in New Window".

I'm sure you don't mean to ask how to write a Web page that will open
its link in a new window, because that is evil and anti-user. (Think
back to how often you've been annoyed by windows opening up unasked,
and don't do that to your visitors.)


Once I read up about the command, I realized the connection with the
dreaded pop-up windows, and also that some anti-pop programs would disable
the feature, so I came to my senses.

What I wanted to do was keep the reader on one page but give them the
option to look at an associated reference page quickly without disrupting
where they were (I guess like a basic popup window). But is sounds like
it'll just cause more aggravation than cause good.


In this case (as a reference item) I would think that a separate,
*smaller* window would be fine.

i.e. a 'pop-up' window.

Unfortunately, you will need to use some javascript for this, which
means that you'll also have to provide a means for the
javascript-challenged to open the page in the existing window --
assuming that it's an essential part of your design :-(

If you do open a page in a new window, be sure to put a short note
somewhere that you will be doing so. This is important for people who
may be listening to your site rather than looking at it.

regards.

--
Jake

Jul 23 '05 #7
zn
Neal <ne*****@yahoo.com> wrote in
news:op**************@news.individual.net:
On Sun, 02 Jan 2005 23:14:18 -0600, zn <zn@zn122.edu.invalid> wrote:
Once I read up about the command,


What "command"?


target=_blank
I realized the connection with the
dreaded pop-up windows, and also that some anti-pop programs would
disable
the feature, so I came to my senses.

What I wanted to do was keep the reader on one page but give them the
option to look at an associated reference page quickly without
disrupting where they were (I guess like a basic popup window). But
is sounds like it'll just cause more aggravation than cause good.


I agree. I can open new windows all I like. So can your user, if it's
of any benefit.


Jul 23 '05 #8

"zn" <zn@zn122.edu.invalid> wrote in message
news:Xn*******************************@216.196.97. 131...
Neal <ne*****@yahoo.com> wrote in
news:op**************@news.individual.net:
On Sun, 02 Jan 2005 23:14:18 -0600, zn <zn@zn122.edu.invalid> wrote:
Once I read up about the command,


What "command"?


target=_blank


It's not a command, it's an attribute.

Jul 23 '05 #9
Harlan Messinger <h.*********@comcast.net> wrote:
"zn" <zn@zn122.edu.invalid> wrote
> What "command"?

target=_blank

It's not a command, it's an attribute.


.... and a value.

Jul 23 '05 #10

"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
Harlan Messinger <h.*********@comcast.net> wrote:
"zn" <zn@zn122.edu.invalid> wrote
> What "command"?
target=_blank

It's not a command, it's an attribute.


... and a value.


And an operator.

Jul 23 '05 #11
Harlan Messinger <h.*********@comcast.net> wrote:
"Neal" <ne*****@yahoo.com> wrote
Harlan Messinger <h.*********@comcast.net> wrote:
> "zn" <zn@zn122.edu.invalid> wrote
>> > What "command"?
>> target=_blank
> It's not a command, it's an attribute.


... and a value.


And an operator.


And a major pain in the ass.

Jul 23 '05 #12
zn wrote:
Once I read up about the command [target attribute]...


http://lachy.id.au/blogs/log/2004/12/html-tags

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://SpreadFirefox.com/ Igniting the Web
Jul 23 '05 #13
zn
Neal <ne*****@yahoo.com> wrote in news:opsj1tmio06v6656
@news.individual.net:
Harlan Messinger <h.*********@comcast.net> wrote:
"Neal" <ne*****@yahoo.com> wrote
Harlan Messinger <h.*********@comcast.net> wrote:
> "zn" <zn@zn122.edu.invalid> wrote
>> > What "command"?
>> target=_blank
> It's not a command, it's an attribute.

... and a value.


And an operator.


And a major pain in the ass.


Thanks to all ... I'm a beginner.
Jul 23 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Obantec Support | last post: by
38 posts views Thread by Shaun McKinnon | last post: by
7 posts views Thread by E Michael Brandt | last post: by
23 posts views Thread by Markus | last post: by
3 posts views Thread by EnjoyNews | last post: by
11 posts views Thread by Alex.Svetos | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

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.