You are so the man, that's exactly what I needed. Seriously I owe you biggie. I was practically in tears at the thought of having to run some huge SQL substr instring ting looking for off site links.
Mike is the man :))))))))) Tim -----Original Message----- From: Haggerty, Mike [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 10:53 AM To: CF-Community Subject: RE: Javascript question Yo Tim; Check this out. M <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- function check_outside_links(){ i = 0; while (i < document.anchors.length){ document.anchors[i].onclick = check_link; i++; } } function check_link(){ lookup = "http://"; if(this.href.match(lookup)){ alert('You are leaving the site.'); } } //--> </SCRIPT> </head> <body onload="check_outside_links()"> <a href="http://www.yahoo.com" name="yahoo">Yahoo</a> <br> <br> <input type="button" value="Alert" onclick="check_outside_links();"> </body> </html> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 10:09 AM To: CF-Community Subject: Javascript question Hey kids, I need to have a message displayed when ever someone clicks a link that takes them off of our site. I figured I could probably write a nice easy onUnLoad function to take care of it, but I can't seem to find a way to get the window.location.href they are heading to. I mean it displays the one they are leaving, just not the new one. I really wanted to do this the easy way and not have to make a bunch of changes and with this function I could just do a single include and have it work across my whole site. Any ideas? Timothy Heald Overseas Security Advisory Council U.S. Department of State ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
