Posted by Toby Inkster on 02/05/06 17:11
JF01 wrote:
> <form action="login.asp" method="post" id="frm1">
> <input type="text" size="30" name="email" id="email">
> <input type="button" value="Register" class="formbutton1" id="submit1"
> name="submit1" onclick=javascript:callsubmit();>
>
> <script type="text/javascript">
> function callsubmit()
> {
> var pwl = frm1.pass.value.length;
> if (frm1.email.value == "")
> {alert("The e-mail field is required");}
> else
> {frm1.submit();}
> }
> </script>
Yucky!
<script type="text/javascript">
function callsubmit ()
{
var e = document.getElementById('email');
return (e.value!='');
}
</script>
<form action="login.asp" method="post" id="frm1"
onsubmit="return callsubmit();">
<fieldset>
<legend>Log in</legend>
<input type="text" size="30" name="email" id="email" />
<input type="submit" name="submit1" value="Register"
class="formbutton1" id="submit1" />
</fieldset>
</form>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|