How to Add a Warning when Navigating to an External Website?
Posted on 2012-04-12
I am working on a website for a client. I am editing their current site that was build by someone else so I am still "learning the code".
Basically, my client wants it so that when a user clicks on a link on the site that takes them AWAY from the company's site, it displays a warning message notifying the user that they are leaving the site.
I know this is extremely annoying, but thats what my client wants. Does anyone know how I can add something like this so it happens "automatically", meaning, I don't have to create a special page for every external link.
Is there a way for some type of PHP script of something to detect when a user clicks a link to an external site it displays the message?