Solved

Disable links from opening in  new tabs or windows

Posted on 2013-01-29
4
264 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

733 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