This topic is locked

Calculate time field in java

8/10/2009 10:48:26 AM
PHPRunner General questions
S
sickacid author

i've done this code, i want to obtain an effettive time of work, for example

MI = morning start 8:00

MF = mordining end 12:00

OreLavorate result is 4:00
but in this code i obtain only numer not time of work
var x = document.editform.value_Pausa;

x.onchange = x.onkeyup = function() {

var MI = document.editform.value_MattinoInizio.value;

var MF = document.editform.value_MattinoFine.value;

var PI = document.editform.value_PomeriggioInizio.value;

var PF = document.editform.value_PomeriggioFine.value;

var PP = document.editform.value_Pausa.value;

document.editform.value_OreLavorate.value = MF - MI;

document.forms.editform.value_Orelavorate.disabled=true;

}

J
Jane 8/11/2009

Hi,
There is a lot of JavaScript code available on the Internet that can help you with this. Check these articles for example:

http://www.experts-exchange.com/Programmin...Q_22106644.html

http://www.webdeveloper.com/forum/archive/...hp/t-36148.html