FIREFOX and CHROME script problems??
in my code is a simple script
that shows an error message if input value didnt meet the requirements.
the example is
register_form - name of the form
username = name of the input type text
requirement is string must be greater or equal to six
error is an id using the span tag and initially/by default is displayed none
and with the onBlur event
<input type="text" name = "username" onBlur = "CheckThis()">
my problem is.
my code totally works fine when i used Google Chrome
but when i used Firefox, the error messages wont display
is there some way to prevent or to make them work on any browsers?
code fragment:
<script language="javascript">
function CheckThis()
{
str = register_form.username.value
if(str.length < 6 )
error.style.display = "block"
else
error.style.display = "none"
}
</script>