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
Sorry I may be off-topic (even though I hope the problem can be solved by means of ASP). Here is the situation: 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! ---
---
 
Unfortunately, to my knowledge, this is a classic chicken and egg problem. You need to be able to capture the address being typed into the address bar, or chosen from a bookmark, etc. If you knew this, you could run a function from the onunload event of the body tag that could analyze the target URL and determine if you were leaving your intranet. However, I don't know of any way to retrieve this value using the default user browser (that doesn't mean it isn't possible, I just don't know it).

That said, it would be quite easy if you wrote your own browser using something like the Visual Basic Browser Control (it sounds like more work than it actually is). Therefore, if it was your browser, you would know what URL the user is trying to navigate to (because it is your control), and you could therefore analyze the URL to see it was within your network.

So, since I know it is possible using a custom browser control, you would think it would be possible with server-side scripting. I may be able to research how using VBScript, but I don't know off the top of my head.

 
Nice Nick "The reward of one duty done is the power to fulfill another"
<%
Jr Clown
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top