Jump to content

hyperlink to perform action before redirecting


jasonc

Recommended Posts

would Javascript be used to perform the following.

link being click would increase a counter in my Db before the link it visited.

 

<a href="www.site.com" (javascript code)></a>

 

can anyone suggest a way of doing this ?

 

thanks in advance

Link to comment
Share on other sites

often times you'll want to send them to an interstitial page along with the URL they're SUPPOSED to go to, do the processing on that page, and then forward them onto their original destination.  javascript, unless you use AJAX, will be unhelpful since it is client-side and cannot initiate server-side work.

Link to comment
Share on other sites

yes true just remembers javascript is client side !

 

i do not use it normally, hardly ever.

 

i shall check out ajax

 

all i want to do is update the counters as my supporters are complaining that the redirect i currently use is not what they awnt for SEO purposes!

 

thanks anyway

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.