views:

33

answers:

0

Hi,

I'm using sIFR on my website and all works like a charm. Now that i'm working on a contactform, i would like to use sIFR for the errormessages. For instance, if someone forgets to fill in a required field and presses the Submit button, the errormessage shows up. The hiding and showing of the errormessages is done by Javascript like so:

if (form.naam.value == "") {
document.getElementById("errorNaam").style.display = 'block';
form.naam.focus();
return false ;

} else { document.getElementById("errorNaam").style.display = 'none'; }

And the HTML snippet:

<div id="errorNaam" class="error"><h7>the errormessage</h7></div>

When i put display:none; in the CSS, the message obviously won't show. After submitting the form, the message pops up on screen, yet without using sIFR. If i delete display:none; from the CSS, the errormessage automatically pops up on screen, with the sIFR.

Maybe sIFR doesn't play well with Javascript?