Thane,

If all you care about is updating a hit counter and not displaying any
code, use the following code:

function Get_Referrer(){
  var oCounter = new Image();
  var sImg = "http://www.stuffbythane.com/SiteTracker/test2.cfm?in=";;
  sImg += escape(document.referrer);
  sImg += "&out=" + escape(document.location);
  oCounter.src = sImg;
}

This will should work in any browser that supports JS v1.1. 

NOTE: You previous code may not have been working because of the lack of
the escape() function.

-Dan

> -----Original Message-----
> From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 10:15 AM
> To: CF-Talk
> Subject: Re: Javascript calling ColdFusion - will this work?
> 
> At 10:07 AM 21/08/02 -0400, Jon Hall wrote:
> >Yes that should work, I've used a similar technique for a banner
> >program in the past.
> 
> That's what I thought, but it isn't working for me.  This is the
complete
> code I'm using - three files in total:
> 
> Alright, I tried this, but I must be doing something wrong:
> 
> Index.htm looks like this:
> <html>
> <body>
> Test page.
> <script language="Javascript"
>
src="http://www.stuffbythane.com/SiteTracker/UpdatePageInfo.js";></script
>
> 
> </body>
> </html>
> 
> UpdatePageInfo.js looks like this:
> function Get_Referrer() {
>     document.write("<script language='Javascript'
> src='http://www.stuffbythane.com/SiteTracker/test2.cfm?in="; +
> document.referrer + "&out=" + document.location + " '>");
>     document.write("</");
>     document.write("script>");
>   }
> Get_Referrer();
> 
> Test2.cfm looks like this:
> <CFQUERY name="test" datasource="SiteTracker">
>          INSERT INTO     Test (In, Out)
>          VALUES                  "#URL.In#", "#URL.Out#"
> </CFQUERY>
> 
> 
> So far as I can tell, test2.cfm doesn't get called.  Or if it does, it
> doesn't run.  Nothing ever ends up in the database, and if I put popup
> Window code in test2.cfm, nothing happens.  So I must be doing
something
> wrong.
> 
> T
> 
> 
> 
> 
______________________________________________________________________
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
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to