Jump to content
  • Advertisement
Sign in to follow this  
pintee

Detect if link opened in new tab or window or direct url access

This topic is 1965 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering if anyone know how to achieve this.

I have an index.php that loads a file page.php into a div using jQuery. This page.php has a link that when you click it loads page2.php into the same div(so the url always stays as index.php).

I want to make it so that, if you open the link on page.php in a new tab or window, instead of loading page2.php, it redirects to index.php(with page.php in the div). Same if you type in the link to page2.php directly into the browser.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!