It looks to me like this just checks for a "http://", right? So if I have a site that spans multiple servers then this isn't going to be a good solution? Say I have the core of the site on one server at www.example.com, but I run the discussion forums at forums.example.com.
-Kevin > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 01, 2003 10:00 AM > To: CF-Community > Subject: RE: Javascript question > > > 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 Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
