Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Disable links from opening in  new tabs or windows

Posted on 2013-01-29
4
Medium Priority
?
278 Views
Last Modified: 2013-02-14
How can i Disable links from opening in  new tabs or windows?
0
Comment
Question by:J N
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 53

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:J N
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 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 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:J N
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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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 …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

688 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