[Javascript] Making a Inline validation using js DOM and CSS part II
Troy III Ajnej
trojani2000 at hotmail.com
Fri Mar 13 18:05:09 CDT 2009
In fact, shorten the script further, you no longer need returns for
the blur/focus events either...
(se below)
<script type="text/javascript" language="JavaScript">
function validar(fieldId, errorId) {
var field = document.getElementById(fieldId);
var value = field.value;
if (value == "") {
document.getElementById(errorId).style.display = "inline";
} else {
document.getElementById(errorId).style.display = "none";
}
}
</script>
Cheers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Troy III
progressive art enterprise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________________________
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009
More information about the Javascript
mailing list