<form name="contact_form" method="post" class="s-form validateble register_form" action = "loading.php" onsubmit="return validateform ( );">
<div class="title">Înregistrare</div>
<div class="s-field ">
<div class="text-wrapper">
<input type="email" value="" tabindex="1" placeholder="E-mail" name="email " />
<div class="icon_email"></div>
</div>
</div>
<div class="s-field ">
<div class="text-wrapper">
<input type="text" value="" tabindex="2" placeholder="Loginul" name="login" />
<div class="icon_username"></div>
</div>
</div>
<div class="s-field">
<div class="text-wrapper">
<input type="password" value="" tabindex="3" placeholder="Parola" name="password" />
<div class="icon_password"></div>
</div>
</div>
<div class="s-field">
<div class="text-wrapper">
<input type="password" value="" tabindex="4" placeholder="Parola inca o data " name="password2"/>
<div class="icon_password"></div>
</div>
</div>
<div class="s-buttons">
<input type="submit" value="Înregistrare" class="button big green wide enable"></input>
</div>
</form>
<script type="text/javascript">
<!--
function validateform ( ){
// 2P
if ( document.contact_form.email.value == "" )
{
alert("Email ");
return false;
}
if ( document.contact_form.login.value == "" )
{
alert("Login ! ");
return false;
}
//-->
</script>
function validateform(){
if ( document.contact_form.elements.email.value == "" )
{
alert("Email ");
return false;
}
if ( document.contact_form.elements.login.value == "" )
{
alert("Login ! ");
return false;
}
}
<form name="contact_form" onsubmit="return validateform()" method="post" class="s-form validateble register_form" action="loading.php">
<div class="title">Înregistrare</div>
<div class="s-field ">
<div class="text-wrapper">
<input type="email" value="" tabindex="1" placeholder="E-mail" name="email" />
<div class="icon_email"></div>
</div>
</div>
<div class="s-field ">
<div class="text-wrapper">
<input type="text" value="" tabindex="2" placeholder="Loginul" name="login" />
<div class="icon_username"></div>
</div>
</div>
<div class="s-field">
<div class="text-wrapper">
<input type="password" value="" tabindex="3" placeholder="Parola" name="password" />
<div class="icon_password"></div>
</div>
</div>
<div class="s-field">
<div class="text-wrapper">
<input type="password" value="" tabindex="4" placeholder="Parola inca o data " name="password2" />
<div class="icon_password"></div>
</div>
</div>
<div class="s-buttons">
<input type="submit" value="Înregistrare" class="button big green wide enable"></input>
</div>
</form>