Friends,
After spending almost 7 hrs, I found alternate solution for my requirement.
This is the code I have used
function getData_callback(res) {
var result = res.value;
if (result == 1) {
isWtngEnable = true;
blinkDIVOn();
}
else {
isWtngEnable = false;
clearTimeout(timer);
document.getElementById("dtWtngTime").style.background = "";
}
}
function blinkDIVOn() {
if (timer) clearTimeout(timer);
document.getElementById("dtWtngTime").style.background = "Yellow"
timer = setTimeout("blinkDIVOff()", 500);
}
function blinkDIVOff() {
if (timer) clearTimeout(timer);
document.getElementById("dtWtngTime").style.background = "";
timer = setTimeout("blinkDIVOn()", 500);
}
Now blinking starts and stops perfectly at once.
Thanks friends.
Regards,
RK