Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

target blank problem

Status
Not open for further replies.

gsc123

Programmer
Joined
Jan 24, 2008
Messages
197
I have a site where the song link is on target=blank so they dont move off the site, i want to count the clicks on the page though, what is best thing to do with asp? active server pages is my code?
 
Set up a database with a table that has columns for a unique ID, the url and a click count.

Create a script in ASP that captures a query string parameter (id) then interrogates the database table, finds the matching id, increments the counter and redirects the user to the url.

In your pages change the links to the script's url with the appropriate parameter for that song and set the target to blank (or if you are working to XHTML standards use javascript) to open the url in a new window.


That's the method. As for how to implement it you will need to ask in the appropriate forums. But it's always good to sit down and work out a method first so you know what you need to do.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Thats what I think I 'm going have to do.,.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top