1.11M Members

Help with java script and banner

 
0
 

Hello guys and gals
I have created a banner for my client. It's a image banner not flash, with common html coding
Eg
<a href="http://www.mysite.com"><img src="http://www.mysite.com/banners/2-12/160x600_5.jpg" width=160 height=600 border=1 ALT="Click to Visit"></a>

Now my client gave me an URL, which is a tracking code of some affiliate network. I need to implement that in my banner, so that when somebody click the tracking code will record it's click and it should take to particular address

I have seen this trick in flash banner.
Now I need to know the same trick in javascript or in html

any help is welcome

Please suppose tracking code as http:// www.tracking. com/asd/jkl/ghj.html

and please post here with tracking code inserted in to banner code

 
0
 

So you have an image, a link that surrounds it and you want to record whether a visitor clicks on it?

The easiest way is to make a link to a PHP page, e.g. referer.php. This page would take a link as argument and then increment the amount of clicks for that link in a database:

<a href='referer.php?link=http://www.mysite.com'><img src="http://www.mysite.com/banners/2-12/160x600_5.jpg" width='160' height='600' border='1' alt="Click to Visit" /></a>

And then in referer.php you retrieve the link using GET, increment a value in a table (something like 'referer_counter') with columns 'link' (string) and 'counter' (integer) that corresponds with the link and then automatically redirect (google how to do it) the visitor to the correct link.

PS: If it's a rotation banner, you need to change the href everytime a new image is loaded.

~G

 
0
 

So you have an image, a link that surrounds it and you want to record whether a visitor clicks on it?

The easiest way is to make a link to a PHP page, e.g. referer.php. This page would take a link as argument and then increment the amount of clicks for that link in a database:

<a href='referer.php?link=http://www.mysite.com'><img src="http://www.mysite.com/banners/2-12/160x600_5.jpg" width='160' height='600' border='1' alt="Click to Visit" /></a>

And then in referer.php you retrieve the link using GET, increment a value in a table (something like 'referer_counter') with columns 'link' (string) and 'counter' (integer) that corresponds with the link and then automatically redirect (google how to do it) the visitor to the correct link.

PS: If it's a rotation banner, you need to change the href everytime a new image is loaded.

~G

Thanx Graphix
I don't know php
So can you please post
coding here
of php page

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: