Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-20-2011, 02:40 PM   #1
New Member
 
Join Date: Jun 2011
Posts: 9
Smile Help with javascript button

Hi guys,

I have an input button which is set to open a url:

Code:
<input type="button" value="Go to facebook" 
onclick="location.href='http://facebook.com'" target="_blank" />
This works fine except the facebook page opens in the same window, how can i get it to open in a new page it appears the target="_blank" does not work on input buttons

Thanks in advance
__________________
website designers
shingionline is offline   Reply With Quote


Old 12-20-2011, 03:39 PM   #2
Platinum Member
 
ronaldroe's Avatar
 
Join Date: Jan 2011
Location: Oklahoma City, OK
Posts: 677
Send a message via Skype™ to ronaldroe
Default

You would probably be better off using an image and linking that, but try this for your specific question.
__________________
Ronald Roe
Small Business Web Design
ronaldroe is offline   Reply With Quote
Old 12-20-2011, 03:43 PM   #3
New Member
 
Join Date: Jun 2011
Posts: 9
Default

Quote:
Originally Posted by ronaldroe View Post
You would probably be better off using an image and linking that, but try this for your specific question.
thank you very much - window.open does the trick
__________________
website designers
shingionline is offline   Reply With Quote
Reply

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



All times are GMT. The time now is 10:59 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.