Hi,
I want to set a function that will count how long a button is held down for however when the button is released I need to run another function that will pass the length of time and a variable passed by the button on to a script usin AJAX. Now im fine with the AJAX once I have my variables but its the bit about setting the variable to the length of time the button was down
Im guessing it will be something like this:
//When button is pressed
function button_down('direction') {
//The variable for counting the time
var Time
//Code for counting
}
//Button up
function button_up() {
//Ajax that sends the variable direction and Time to a script
//Dont bother writing this bit I am OK with it
}
Thanx,
Sam Rudge