Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<input type="submit" name="sub_button" disabled />
function validate( the_form ) {
// some validation tests here
if (something is not valid) return false;
if (something else is not valid) return false;
the_form.sub_button.disabled = false;
}
<input type="text" name="first_name" onchange="return validate();" />
<input type="text" name="first_name" onchange="return validate([b]this.form[/b]);" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<title>new document</title>
<script language="javascript" type="text/javascript">
<!--
function validate() {
var isNotValid = false;
var flds = new Array('name', 'address', 'city');
var e = document.forms['f'].elements;
for (var i = 0; i < flds.length; i++ ) {
if (e[ flds[ i ] ].value.length == 0) isNotValid = true;
}
e['sub'].disabled = isNotValid;
}
-->
</script>
</head>
<body>
<form name="f">
<fieldset>
<input type="text" name="name" onchange="validate(this.form);" />
<label for="t1">Is My Name</label><br />
<input type="text" name="address" onchange="validate(this.form);" />
<label for="t1">Is My Address</label><br />
<input type="text" name="city" onchange="validate(this.form);" />
<label for="t1">Is My City</label><br />
<input type="submit" value="Submit" name="sub" disabled />
</fieldset>
</form>
</body>
</html>