The Straight Dope

Go Back   Straight Dope Message Board > Main > General Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2006, 02:29 PM
SweetHomeColorado SweetHomeColorado is offline
Guest
 
Join Date: Aug 2006
Webdesign, how do I make a link 'pop-up'?!

On a site, instead of just having the link lead to another site, I would like to have the link popup a new window and keep the originating page the way it is. How am I able to do this? Is there certain code that I need to use to change the link from a normal link to a popup link?
Reply With Quote
Advertisements  
  #2  
Old 11-10-2006, 02:45 PM
Turek Turek is offline
Charter Member
 
Join Date: Jan 2003
Location: Inara's shuttle
Posts: 3,175
The simplest way is to put target="_blank" in the link tag, like this:

<a href="URL HERE" target="_blank">Click here to go somewhere</a>
Reply With Quote
  #3  
Old 11-10-2006, 10:29 PM
t-bonham@scc.net t-bonham@scc.net is offline
Guest
 
Join Date: Mar 2003
Quote:
Originally Posted by SweetHomeColorado
On a site, instead of just having the link lead to another site, I would like to have the link popup a new window
This is an evil thing to do. Don't!

Luckily, it's my computer, and I don't have to give a damn about what you "would like". Like many others, I have a popup-blocker installed that will kill your popup so it never appears on my screen. That means all of us will never see this part of your site at all. That's no problem for us. But it might be for you, if you have something there that you want us to see.

You're much better off avoiding coding that makes your site resemble scammers, spammers, & porn sites. Most online users now have software to block such sites while surfing, which would also block your site, thus greatly reducing your audience. Are you sure that is what you want to do?
Reply With Quote
  #4  
Old 11-10-2006, 11:40 PM
friedo friedo is online now
Charter Member
 
Join Date: May 2000
Location: Brooklyn
Posts: 19,255
Jesus H. Christ on a cracker, t-bonham, there's a bit of a difference between an unsolicited Javascript popup and target="_blank" in a link.

I'm not aware of any popup blockers that would break that functionality, either. Firefox 2 opens them in a new tab by default.
Reply With Quote
  #5  
Old 11-11-2006, 07:56 AM
LSLGuy LSLGuy is offline
Charter Member
 
Join Date: Sep 2003
Location: St. Louis, MO USA
Posts: 6,155
Agree with Friedo. target=_blank is just fine, not blocked by any pop-up blocker of which iI'm aware, and has many valid uses. If your goal is to avoid losing the user to some external site, we'll that's an evil desire & should be stopped. If yuo're doing what amounts to a dialog box in desktop thick-client programming, well that's a good thing.

For all the would-be purists out there, the web has evolved away from the original simple tatic page & link model where server/author gives content and browser/user decides presentation.

We in industry are building apps that are meant to provide the same rich client desktop experieince, just delivered through the browser to simplify deployment. We're building these things because the collective customer base wants them.

We'd love to stop using html as the delivery mechanism, but we're trapped with an installed base of technology.
__________________
The day we stopped being "citizens" and started being "consumers" was the beginning of the End of Western Civilization.
Reply With Quote
  #6  
Old 11-11-2006, 08:06 AM
jjimm jjimm is offline
Guest
 
Join Date: Jul 2001
Totally with Friedo. Target ="_blank" allows the user not to lose their place on the site they're currently using, but still to view the linked information. I wonder what t-bonham does when there's an external link on the SDMB? Does he refuse to click it? I know that I'd be very peeved if I lost my place in a thread every time there was a cite in it.
Reply With Quote
  #7  
Old 11-11-2006, 12:51 PM
SweetHomeColorado SweetHomeColorado is offline
Guest
 
Join Date: Aug 2006
and to think, my entire goal for my pen15 en1argement site is to take people away from the original page and into my dungeon or buying things they dont need.

There's sarcasm, now the truth:

It's a newsletter type format where we dont want to steer people away from the original page. we have many elderly people ready it and we dont want them to click a link and not be able to find the originating page.

Shame on me!!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Send questions for Cecil Adams to: cecil@chicagoreader.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Publishers - interested in subscribing to the Straight Dope?
Write to: sdsubscriptions@chicagoreader.com.

Copyright © 2013 Sun-Times Media, LLC.