~ubuntu-branches/ubuntu/precise/libcgi-formbuilder-perl/precise

« back to all changes in this revision

Viewing changes to t/2e-test01.html

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard
  • Date: 2011-09-11 02:55:17 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110911025517-nhr6j6fwwc9xc4l1
Tags: 3.06-1
* New upstream release.
* Use CDBS perl-makemaker.mk (not deprecated perlmodule.mk).
  Tighten build-dependency on CDBS.
* Update copyright file:
  + Fix use Comment field (not License-Comments).
  + Quote license names in comments.
* Add patch cherry-picked upstream to fix testsuite.
* Update package relations:
  + Build-depend on and suggest libcgi-ssi-perl.
  + Make suggestions unversioned and drop conflicts: satisfied even in
    oldstable.
  + Maintain all relations using CDBS in rules file.
* Stop preserving cruft no long shipped upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
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) {
 
6
    var alertstr = '';
 
7
    var invalid  = 0;
 
8
    var invalid_fields = new Array();
 
9
 
 
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';
 
14
        invalid++;
 
15
        invalid_fields.push('name');
 
16
    }
 
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.');
 
21
        return false;
 
22
    }
 
23
    return true;  // all checked ok
 
24
}
 
25
//-->
 
26
</script>
 
27
<p>
 
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" /> 
 
32
</form>