dojo TimeTextBox don't listen to on blur event
Posted
by kawtousse
on Stack Overflow
See other posts from Stack Overflow
or by kawtousse
Published on 2010-05-01T08:54:12Z
Indexed on
2010/05/01
8:57 UTC
Read the original article
Hit count: 198
dojo
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.
© Stack Overflow or respective owner