prajakta
12-15-2006, 04:09 AM
hi,
In my program have 2 fields. and that fiels must not be null. when i write the code both field onBlur it goes in loop.
code
function firstonblur()
{
if(document.getElementById('a').value.length<=0)
{
alert("Field A must be enter");
document.getElementById('a').focus();
}
}
function secondonblur()
{
if(document.getElementById('b').value.length<=0)
{
alert("Field B must be enter");
document.getElementById('b').focus();
}
}
plz send the perfect solution for this problem.
In my program have 2 fields. and that fiels must not be null. when i write the code both field onBlur it goes in loop.
code
function firstonblur()
{
if(document.getElementById('a').value.length<=0)
{
alert("Field A must be enter");
document.getElementById('a').focus();
}
}
function secondonblur()
{
if(document.getElementById('b').value.length<=0)
{
alert("Field B must be enter");
document.getElementById('b').focus();
}
}
plz send the perfect solution for this problem.