How many times have you gone to a web site (via a search engine, link, etc) and if you didn't find what you were after you left without worrying about going through the web site further...preferring not to waste time looking for a link for further information? Most surfers do this. Infact, the author has a habit of doing the same thing.
The Referring URL Probe can help keep visitors on your web site longer, especially if you have reached a targeted visitor. How is this possible? The Referring URL Probe control determines if a visitor has accessed one of your web pages directly, or through another site (such as a search engine).
If the control detects that the visitor has directly accessed a web page, or has come from another site, it will display a timed message that the visitor will see. Since you can customize the message, it should be something to the effect of "More can be found by clicking on the button on the top left of the page" or what you deem relevant. After the message disappears, the control places a link at the top-left of the page (the link is customizable as well).
Naturally, if the user is already going through your web site, the control does not activate itself. Is that great, or what?
A Working ExampleIf you came to this page from another web site, you should have noticed a message come up and then a button appear (if not, copy and paste the URL into a new window and load the page). But, if you had come to this web page from a referring page on this site, you probably didn't see anything at all (because you were already surfing the site the control did not activate itself).
How does the control work?The Referring URL Probe was designed to monitor web pages opened in new windows (you place the control's code in the web page that is placed in a new window). With it's modular design, you can open new windows from a "master browser window". You can even open web pages into new windows from within an IFRAME that is resident on the "master browser window", and it will still work!
In other words . . . this control is, perhaps, most valuable to web sites that link to content within their site that they want displayed in a new window (there can be a wide range of reasons for having content appear in a new window from another...such as subject specific tutorials, exhibits, and so forth). And, the control even recognizes new windows opened from IFRAME inline windows.
How To Get The Script Running On Your Webpage(s)
<script language="javascript" src="urlprobe.js">
<!--
/*
Referring URL probe. Author Joe McCormack. Copyright 2003. All Rights Reserved.
http://www.geocities.com/code_stratos/
*/
//-->
</script>
<!-- Referring URL Probe DIV codes, placed above the tag. -->
<div id="himage" style="position:absolute;visibility:hidden;top:0;left:0;"><img src="SOMEIMAGE.gif" border="0"></div>
<div id="pprobe" style="position:absolute;visibility:hidden;z-index:200;"></div>
<div id="linkback" style="position:absolute;visibility:hidden;z-index:200;"></div>
NOTE: Be sure to point to an image (either static or animated) in place of SOMEIMAGE.gif above.
<body onload="urlprobe(10000,0,84,284,122,'trebuchet ms',3,'#FCF5AD','#A49806','SEE MORE','See more by clicking on the button that will appear at the top left of the page.','yoursite.com','http://www.yoursite.com/somepage.html');">
<div id="yoursite.com" name="yoursite.com" src="somepage.html"...>
------------------
FUNCTIONS OVERVIEW:
Function: urlprobe(a, b, c, d, e, f, g, h, i, j, k, l, m)
------------------
Function Parameters:
| a = 10000 | Duration to display message in milliseconds. 1 second = 1000 milliseconds. |
| b = 0 | Number of the image to use with the message. If it is the only image on the web page, it's value is zero. Since the image is always the last one on the web page to appear, simply count the number of images on the web page (starting with 0 as the first one) to the image with the message...the resultant number is it's index number. You place that number here. |
| c = 84 | Width, in pixels, of the image. |
| d = 284 | Width of the message box including width of the image. |
| e = 122 | Height of the image. In some cases, you may want to add one to this value. |
| f = "trebuchet ms" | Font family. You can specify more than one. |
| g = 3 | Font size. |
| h = "#FCF5AD" | Background color of box and button. Can use HEX. |
| i = "#A49806" | Foreground color for borders and text. Can use HEX. |
| j = "SEE MORE" | Text string that appears in the button. Note: you must substitute for any spaces. |
| k = "See more by clicking on the button that will appear at the top left of the page." | This is the message that appears in the message box for the visitor to read. |
| l = "yoursite.com" | The text phrase you want to match to your web site. For instance, this can be a url as shown, a subdirectory name, etc. If this text is not matched then the control is activated and the message displayed. |
| m = "http://www.yoursite.com/somepage.html" | The link you want to have visitors go to when they click on the button. |