View Full Version : blocks opening external links

Real Hyder
06-18-2012, 08:29 PM
Friends. I require a script which blocks opening external site when someone click on any external link on my website.

Is it possible??

Old Pedant
06-18-2012, 09:27 PM
Ummm...if you don't want them clicking an external link, don't put one on your site.

Presto, you are done.

Philip M
06-19-2012, 08:59 AM
Is he trying to block links contained in adverts and thus violate his TOS?

06-19-2012, 10:30 AM
You can't prevent anything with JavaScript unless it is your browser - then you an attach JavaScript to the browser that blocks sites from being able to interfere with what you want to do. JavaScript attached to web pages can be turned off or overridden.

The only part of the web page under the control of the page author is the HTML and what runs on the server.