Could you anyone can help me how can I send a Stopwatch Javascript value send it through PHP file ....
this is my time JavaScript file ...
var timercount = 0;
var timestart = 0;
function displaytime() {
if(timercount) {
clearTimeout(ti mercount);
}
if(!timestart){
timestart = new Date();
}
var timeend = new Date();
var timedifference = timeend.getTime () - timestart.getTi me();
timeend.setTime (timedifference );
var minutes_passed = timeend.getMinu tes();
if(minutes_pass ed <10){
minutes_passed = "0" + minutes_passed;
}
var seconds_passed = timeend.getSeco nds();
if(seconds_pass ed <10){
seconds_passed = "0" + seconds_passed;
}
document.timefo rm.timetextarea .value = minutes_passed + ":" + seconds_passed;
timercount = setTimeout("dis playtime()", 1000);
}
function sw_start(){
if(!timercount) {
timestart = new Date();
document.timefo rm.timetextarea .value = "00:00";
timercount = setTimeout("dis playtime()", 1000);
}
}
function Stop() {
if(timercount) {
clearTimeout(ti mercount);
timercount = 0;
}
}
function Reset() {
document.timefo rm.timetextarea .value = "00:00";
}
............
code you any one send me and example to how can I send this output value ...?????
It would be very helpful for me if anyone can help me ....
this is my time JavaScript file ...
var timercount = 0;
var timestart = 0;
function displaytime() {
if(timercount) {
clearTimeout(ti mercount);
}
if(!timestart){
timestart = new Date();
}
var timeend = new Date();
var timedifference = timeend.getTime () - timestart.getTi me();
timeend.setTime (timedifference );
var minutes_passed = timeend.getMinu tes();
if(minutes_pass ed <10){
minutes_passed = "0" + minutes_passed;
}
var seconds_passed = timeend.getSeco nds();
if(seconds_pass ed <10){
seconds_passed = "0" + seconds_passed;
}
document.timefo rm.timetextarea .value = minutes_passed + ":" + seconds_passed;
timercount = setTimeout("dis playtime()", 1000);
}
function sw_start(){
if(!timercount) {
timestart = new Date();
document.timefo rm.timetextarea .value = "00:00";
timercount = setTimeout("dis playtime()", 1000);
}
}
function Stop() {
if(timercount) {
clearTimeout(ti mercount);
timercount = 0;
}
}
function Reset() {
document.timefo rm.timetextarea .value = "00:00";
}
............
code you any one send me and example to how can I send this output value ...?????
It would be very helpful for me if anyone can help me ....
Comment