Hidden DIV tag problem

admin

Administrator
Staff member
Hello Everybody,

I have a little problem with my DIV tags.

I have this tag in my form...

<DIV id="DateEndjs" STYLE="VISIBILITY:hidden;"></DIV>

And this is done onSubmit of the form:

if(document.getElementById('DateEnd').value == ''){
document.getElementById('DateEndjs').innerHTML = "<span class=\"TextNormalError\">This field must not be left blank.</span>";
document.all['DateEndjs'].style.visibility = "visible";
}else{
document.getElementById('DateEndjs').innerHTML = '';
document.all['DateEndjs'].style.visibility = "hidden";
}

When I first submit the page and don't fill in the field, it dynamically appears the error, that is good, but when I fill it in, it just hides it, but doesn do it dynamically=there is a blank line, you can't just see the error, but you can see the space for it.

Can anyone help me with this? Also how can I make it, to check, when I put my cursor out of the textbox? I would like to do it that way rather than wait to push submut buttn

Thank you all,

Mike
 
Back
Top