dojo TimeTextBox don't listen to on blur event
- by kawtousse
Hi everyone,
I want to add an on blur event to a dojo timetextbox but the event never been runned
so the declaration of the timetextbox is like this:
<label>End</label><input id="endp" name="endp" onBlur="calculateTimeSpent2(startp,endp,output);" />
the javascript function is like this:
function calculateTimeSpent2(startp,endp,outputp)
{
var tmp0=document.getElementById('startp').value.split(':');
var tmp1=document.getElementById('endp').value.split(':');
if (tmp0[0]!='' && tmp1[0]!='')
{
var val1= findtime(tmp0[0],tmp0[1],tmp1[0],tmp1[1]);
var tmp=val1.split(':');
if (tmp[0].indexOf('-')==-1)
document.getElementById('outputp').value=val1;
else
{
alert ("Start Time must be lower than End Time ");
document.getElementById('endp').focus();
}
}
}
I don't understand why dojo didn't execute the event correctly while loosing the focus.
I tried to put the type=text but it does'nt work.
Thanks for help.