Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Web Design and HTML
Reload this Page Automatically Create New Tab When Someone Enters The Page
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
Junior Member
JamesIsDusk is on a distinguished road
 
Posts: 20
Join Date: Jun 2012
Default Automatically Create New Tab When Someone Enters The Page - 07-10-2012, 01:09 AM

I want a code on my site that automatically creates a new tab and goes to a specific url whenever someone visits my site. How do I do this?

Thanks! :-)
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,115
Join Date: Jul 2011
Location: UK
Default 07-10-2012, 07:25 AM

Opens a new tab but doesn't go there? This would happen every time you went to your sites home page? You'd end up with alot of open tabs!
Reply With Quote
(#3 (permalink))
Old
Junior Member
tempz is on a distinguished road
 
Posts: 17
Join Date: Jul 2012
Default 07-12-2012, 07:20 AM

Use javascript if you want it so when someone visits your website it will open a new tab with your url

here is the javascript code:

Code:
function open_in_new_tab(url) {
  window.open(yoururl, '_blank');
  window.focus();
}
Add this to your header!

but if you want it so when somone clicks a link here is the code:

Code:
<a href="#" onclick="window.open(this.href);return false;">Link</a>
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 Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com