Thanks. I was really stuck on this. I will test this tomorrow and post back the progress and the doubts. Thanks a lot, Regards, Márcio -----Original Message----- From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org] On Behalf Of Troy III Ajnej Sent: sexta-feira, 13 de Março de 2009 23:05 To: javascript at lists.evolt.org Subject: Re: [Javascript] Making a Inline validation using js DOM and CSS part II 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 _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript