2
<title>User Info</title>
3
Please update your info and hit "Submit".
4
<script type="text/javascript"><!-- hide from old browsers
5
function validate (form) {
8
var invalid_fields = new Array();
10
// name: standard text, hidden, password, or textarea box
11
var name = form.elements['name'].value;
12
if (name == null || ! name.match(/^[a-zA-Z]+$/)) {
13
alertstr += '- Invalid entry for the "Name" field\n';
15
invalid_fields.push('name');
17
if (invalid > 0 || alertstr != '') {
18
if (! invalid) invalid = 'The following'; // catch for programmer error
19
alert(''+invalid+' error(s) were encountered with your submission:'+'\n\n'
20
+alertstr+'\n'+'Please correct these fields and try again.');
23
return true; // all checked ok
28
<form action="TEST" method="get" onsubmit="return validate(this);"><input id="_submitted" name="_submitted" type="hidden" value="1" />
29
Enter your name: <input id="name" name="name" type="text" />
30
FYI, your dress size is 42<br>
31
<input id="_reset" name="_reset" type="reset" value="No esta una button del submito" />