Ad rotator with click tracking

I am looking for some sample code that will rotate ads on a web page.  The code I have is a javascript and it rotates the ads find.  I want to be able to track the clicks each time an ad is clicked on.    I am using but dont want tp use the ad rotator control becuase i want the ads to rotate every few seconds and no just when the page is refreshed.  Can somebody give me input on how i can do this?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

can't your monitor onclick event and see what is the ad that is clicked at the moment?
Mike_StevensAuthor Commented:
I dont know......i guess that is what I am asking
I think you can use such approach.
Write a javascript function YourFunction which to be called on onClick event, and add it in the tag where the ads are handled like this onClick="YourFunction()"
In the function check which ad is currently displayed - I suppose you can check for some id of the ad, you may see it from the JS function that you've said you already use.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike_StevensAuthor Commented:
I will give it a shot.  Sounds like a good approach.  Now i just have to see if i can make it work.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.