Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Closed Thread
My hyperlink button opens two tabs!
Old 01-18-2010, 03:41 PM My hyperlink button opens two tabs!
Junior Talker

Posts: 2
Name: Jake
Trades: 0
I'm using this code:
HTML Code:
<a href="{URL}" target="_blank"><input type="button" value="{TEXT}" /></a>
When I click the button it opens two new tabs. This is the html I'm using for a BBcode button on my forum and I don't want two tabs to open every time a poster clicks one of these buttons. I set the target to "_blank" because I want the button to open the specified URL in a new tab when the user clicks the button. This way they wont leave my website. How can I fix this?

EDIT: I'm probably using the <a> tag and the <input> tag in the wrong way...is there a better way of doing this?

Last edited by CHA0S; 01-18-2010 at 03:50 PM..
CHA0S is offline
View Public Profile
 
 
Register now for full access!
Old 01-18-2010, 04:25 PM Re: My hyperlink button opens two tabs!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
get rid of the target attribute, leave it up to users to decide. The "I don't want users to leave" is 1990's thinking.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-18-2010, 04:40 PM Re: My hyperlink button opens two tabs!
Junior Talker

Posts: 2
Name: Jake
Trades: 0
I guess I'll have to live with it, thanks.
CHA0S is offline
View Public Profile
 
Old 01-18-2010, 06:41 PM Re: My hyperlink button opens two tabs!
Experienced Talker

Posts: 30
Name: Tyler
Trades: 0
Don't listen to that... Think of it like this. If you're the user: Would you want the link to open a new tab or not? Sometimes it's appropriate other times it's not.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
drizzle is offline
View Public Profile
 
Old 01-18-2010, 07:00 PM Re: My hyperlink button opens two tabs!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by drizzle View Post
Sometimes it's appropriate other times it's not.
EXACTLY!! which is why you should leave it to the user to decide!

They are quite capable of right clicking and choosing "Open in new Tab" or "Open in new Window" and it is much preferable to the page deciding they have to have a mass of new windows open.

You have heard of the "back button" that can be used to get back to your site?
Well opening new windows breaks that capability and means users are more likely to lose where they were after two or three links have been clicked on.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-18-2010, 10:04 PM Re: My hyperlink button opens two tabs!
DigitalLinx's Avatar
Junior Talker

Posts: 20
Trades: 0
IMO only external links should be opened in a new tab/window, it would decrease the bounce rate as well.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

The opinions expressed on this site are my own and do not necessarily represent those of my employer
DigitalLinx is offline
View Public Profile Visit DigitalLinx's homepage!
 
Old 01-19-2010, 07:58 AM Re: My hyperlink button opens two tabs!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by DigitalLinx View Post
IMO only external links should be opened in a new tab/window, it would decrease the bounce rate as well.
How??
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-19-2010, 09:46 AM Re: My hyperlink button opens two tabs!
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Quote:
it would decrease the bounce rate as well.
Maybe the page would get forgotten about and never closed!
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
View Public Profile
 
Old 01-19-2010, 10:39 AM Re: My hyperlink button opens two tabs!
xela1966's Avatar
Super Talker

Posts: 135
Name: Baptista
Location: Alvor, Algarve Portugal
Trades: 0
Maybee he needs to use more this code onclick="this.target='_blank;'".

Any way do you think this will be bad to the site in the search engines if we us it to much??
__________________
Algarve Holidays
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
xela1966 is offline
View Public Profile Visit xela1966's homepage!
 
Old 01-19-2010, 10:45 AM Re: My hyperlink button opens two tabs!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
nothing to do with search engines
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-19-2010, 04:01 PM Re: My hyperlink button opens two tabs!
xela1966's Avatar
Super Talker

Posts: 135
Name: Baptista
Location: Alvor, Algarve Portugal
Trades: 0
Quote:
Originally Posted by chrishirst View Post
nothing to do with search engines
ok because I have some pages that I use it for external sites as hotels.
__________________
Algarve Holidays
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
xela1966 is offline
View Public Profile Visit xela1966's homepage!
 
Old 01-20-2010, 09:42 AM Re: My hyperlink button opens two tabs!
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Nothing to do with search engines, but it CAN be a problem for accessibility. If you're going to have a link open a new window you should TELL the user that that is what will happen. Opening windows in people's faces is annoying, confusing to some, and even considered rude by many.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
View Public Profile
 
Old 01-20-2010, 10:46 AM Re: My hyperlink button opens two tabs!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by xela1966 View Post
ok because I have some pages that I use it for external sites as hotels.
On a similar vein;


Would the taxis you advertise load up at Faro airport, have the passengers get in one side of the car, out the other and get into a different car then drive to the hotel, thus leaving the first car outside the airport??
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-20-2010, 01:21 PM Re: My hyperlink button opens two tabs!
Junior Talker

Posts: 2
Name: Tom
Trades: 0
Outgoing links will always be in a new tab with me. My own website-pages never, that's really annoying (except for a small info popup).
TomTom__ is offline
View Public Profile
 
Old 01-20-2010, 03:13 PM Re: My hyperlink button opens two tabs!
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Again, you're breaking the functionality of the "back" button by doing that. People are used to using the Back button and studies show they do so liberally, that's how they know to get around - opening new windows kills that functionality and it can be confusing to people.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
View Public Profile
 
Old 01-20-2010, 03:28 PM Re: My hyperlink button opens two tabs!
xela1966's Avatar
Super Talker

Posts: 135
Name: Baptista
Location: Alvor, Algarve Portugal
Trades: 0
Please click here: Here
__________________
Algarve Holidays
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
xela1966 is offline
View Public Profile Visit xela1966's homepage!
 
Old 01-20-2010, 03:59 PM Re: My hyperlink button opens two tabs!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Try the www button
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 01-20-2010, 04:54 PM Re: My hyperlink button opens two tabs!
xela1966's Avatar
Super Talker

Posts: 135
Name: Baptista
Location: Alvor, Algarve Portugal
Trades: 0
not all then

Any way with or without pop ups I like to be here.
__________________
Algarve Holidays
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by xela1966; 01-20-2010 at 04:58 PM..
xela1966 is offline
View Public Profile Visit xela1966's homepage!
 
Closed Thread     « Reply to My hyperlink button opens two tabs!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.05095 seconds with 12 queries