Reply to Re: XHTML Javascript compatability with Firefox

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация