Solved

Disable links from opening in  new tabs or windows

Posted on 2013-01-29
4
241 Views
Last Modified: 2013-02-14
How can i Disable links from opening in  new tabs or windows?
0
Comment
Question by:M. Jayme Nagy
  • 2
  • 2
4 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 38833837
You can't prevent a link from opening in a new window or browser if the user forces it.  But if you set your links without a target http://www.w3schools.com/tags/att_link_target.asp it will naturally open up in the same browser.
0
 
LVL 6

Author Comment

by:M. Jayme Nagy
ID: 38840581
the reason why i am asking is that i am considering putting everything in an iframe to hide the URL of all the pages. however if someone right clicks on a button or menu item and selects opening in new tab or something like that i want the new tab to be blank so the URL remains to be hidden. i know that i have come accross it personally but i do not know how to accomplish this. ideas?
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 38841118
The iframe does not hide the url.  Some browsers all you to "open this frame only".  

Let's say you are bringing in a page from  http://www.secret.com/page.html as an iframe to http://www.yourdomain/yourpage.html.  The iframe code is something like <iframe src="http://www.secret.com/page.htm"></iframe> and there you can see the secret url.

I have never tried this but you could try this

ajax post to http://www.yourdomain/scrape.html which in turn does an ajax post to http://www.secret.com/page.htm to scrape the data, bring it to http://www.yourdomain/scrape.html and that brings it to http://www.yourdomain/yourpage.html.

I think that is a bad idea though.   It would still be detectable where the data came from but a little harder.  


Even if  you only scraped just one page, you can embed it on your page then there is no right clicking.
0
 
LVL 6

Author Comment

by:M. Jayme Nagy
ID: 38841353
Hi,

thanks for that padas!!

i realize that i would have to put the source in the iframe but im not too concerned with that.

where can i find more information about embeding pages into one???
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to count occurrences of each item in an array.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now