473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Javascript click counter

347 100+
Hi I have a site that plays variouse mp3s of voiceover numbers vary depending on person, i am trying to keep a record of the amount of times the links are pressed because the player for the mp3s opens in an i frame and i have a back button on the main page and want this back button to return to previouse page and not step back through the played mp3s i hope this is understandale thanks
Nov 5 '07 #1
3 5136
colinod
347 100+
Hi I have a site that plays variouse mp3s of voiceovers numbers vary depending on person, i am trying to keep a record of the amount of times the links are pressed because the player for the mp3s opens in an i frame and i have a back button on the main page and want this back button to return to previouse page and not step back through the played mp3s i hope this is understandale thanks
Nov 5 '07 #2
iam_clint
1,208 Expert 1GB
in the head put
<script>var clicks = 0;</script>

on the link put onclick="clicks++;"
such as
<a href="blah.html" onclick="clicks++;">Blah</a>

then when your finally ready to use it you just use the variable clicks

<input type="button" onclick="alert('you have clicked '+clicks+' songs');" value="Clicks!">
Nov 5 '07 #3
colinod
347 100+
thankyou for the help i have not tried this yet as i have done what i was trying to do by using asp scripts but thanks anyway i will try this way later
Nov 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
6
by: Geoff | last post by:
Here's the situation. I have a static html page which we want to update to include some dynamic content. I want a counter that keeps track of the number of times anyone presses the "add" button,...
6
by: sakms | last post by:
I am attempting to validate radio buttons in Netscape with JavaScript. Everything works excellent in Explorer, but refuses to work in Netscape (all versions). =========== JAVASCRIPT CODE...
1
by: rkapur12 | last post by:
In my jsp code I have an image which if someone clicks on that it stores data like "string1" in the hidden field that I have defined on page as: <html:hidden property="selectedOfficeType"...
5
by: Andrew | last post by:
Hi, Is there a javascript code to capture the browser's refresh button click event ? I know that I can handle that event with some c# code, but I was just wondering if that can be done using...
4
by: lmarceglia | last post by:
Hi, I have this website that doesn't work in Firefox 1.5: www.pianetaluca.com The HTML source is: <TITLE>PianetaLuca</TITLE> </HEAD>
9
by: brett | last post by:
I'd like to execute javascript if I'm in a certain directory. I can't figure out how to render the javascript script below. I always end up with some type of parsing error. Any suggestions? ...
6
by: adamscybot | last post by:
Here is the site in question: http://www.sws.vxcomputers.com/h2k/ Basically, on the left, you'll see a roster (them images) and you have to click the "Counter-Strike" link for it to load the...
6
by: vijeberal | last post by:
Hi all, I am working on a GridView and there exist a Checkbox control .. iplaced another checkbox in header also i have written a javascript for selection of checkboxex fro e.g if you click on...
3
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.