By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,739 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,739 IT Pros & Developers. It's quick & easy.

code to popup link in new browser window

P: n/a
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
Share this Question
Share on Google+
13 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a
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

P: n/a

"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

P: n/a
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

P: n/a
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

P: n/a
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.