View Full Version : Webdesign, how do I make a link 'pop-up'?!
11-10-2006, 02:29 PM
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?
11-10-2006, 02:45 PM
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>
11-10-2006, 10:29 PM
On a site, instead of just having the link lead to another site, I would like to have the link popup a new windowThis 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?
11-10-2006, 11:40 PM
I'm not aware of any popup blockers that would break that functionality, either. Firefox 2 opens them in a new tab by default.
11-11-2006, 07:56 AM
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.
11-11-2006, 08:06 AM
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.
11-11-2006, 12:51 PM
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!!
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.