What about placing your update code into a separate template called
maybe updVisits.cfm and then on your page that you have your links, place a
section
of JavaScript such as:

<SCRIPT LANGUAGE="JavaScript1.1">
         function updVisits(){
                 <CFINCLUDE TEMPLATE="updVisitorCount.cfm">
         }
</SCRIPT>

Then in your HREF link set an onClick event to do the update at that point.

Just a suggestion.  Probably something easier out there somewhere.

Larry Juncker
Senior Cold Fusion Developer
Heartland Communications Group, Inc.
[EMAIL PROTECTED]

-----Original Message-----
From: Tom Forbes [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 11:08 PM
To: CF-Talk
Subject: How do I increment counter field by clicking on link?


Help Please -

I have a database table with company information, and a field called
"Visits" -

The below link appears in the left hand frame panel. When clicked, the
visitor sees the company's web site in the right hand frame (bottomright).

<A href="http://#WebAddress#"; TARGET="bottomright">#CompanyName#</a>

I want to increment the "Visits" field by one count every time the link is
clicked. I have tried many approaches, but am unable to resolve this - can
someone please help me??

Thanks very much!

Tom






*******************************************************
MedMatrix Used Medical Equipment Web Portal
http://www.medmatrix.com
V:(407) 772-3427       F:(407) 772-3428
Tom Forbes,  Forbes Web Consulting, Inc.
178 S. Monterey Isle Blvd., Longwood, FL - 32779
*******************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to