470,648 Members | 1,618 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,648 developers. It's quick & easy.

Open New Tab On Button Click

How do I make this open the link in a new tab on button click?

<button type="button" name="" value="" ONCLICK="window.location.href='URL'">submit</button>
Jun 22 '12 #1

✓ answered by karthik1981

Please use the below coding:

<input type="button" value="Open Window"
onclick="window.open('http://www.domain.com')">

4 107384
Please use the below coding:

<input type="button" value="Open Window"
onclick="window.open('http://www.domain.com')">
Jun 22 '12 #2
You, sir, are THE BOSS!
Jun 25 '12 #3
<a href="newtabpath" target="_blank"><input type="Submit" value="Click Here" /></a>
Jun 25 '12 #4
<input type="button" value="Open Window"
onclick="window.open('http://www.domain.com')">

or

onclick="window.location.href='http://www.domain.com/','_blank'";
Jul 2 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Charlie Brookhart | last post: by
7 posts views Thread by =?Utf-8?B?bWFydGluMQ==?= | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.