Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

warning on leaving intranet

Status
Not open for further replies.

Rydel

Programmer
Feb 5, 2001
376
CZ
I am designing an Intranet for a company and I would like to have an automatic warning dialog whenever there is a link outside of our intranet ( to an outside resource ( and user clicks on it. Of course, I can create "onclick" handler for all links, but this is too cumbersome and difficult to maintain. tt would be much better if there was a generic way to issue this warning "once and for all". All Intranet users have IE5.0 or IE5.5 (what a blessing! ;)) Any help greatly appreciated!
---
---
 
One method I have used in the past for a similar effect is to script it (I've used either Perl or ColdFusion for this):

Set each external link on your intranet to something like leaving.asp?url=outside.com

Then code your script so that your message appears, then redirects to outside.com after 15 seconds (or something similar)
 
You could do the same type of thing with just javascript. Something like this:
Code:
function externalLink(theUrl) {
   alert("You are leaving our IntraNet!");
   document.location = theUrl;
}
...
<a href=&quot;javascript:externalLink(&quot;[URL unfurl="true"]www.somewhere.com/somepage.html&quot;)>Go[/URL] somewhere</a>
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top