Solved

Disable links from opening in  new tabs or windows

Posted on 2013-01-29
4
231 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
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 …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

762 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

12 Experts available now in Live!

Get 1:1 Help Now