webforms2.0

Reference website: http://code.google.com/p/webforms2/

Documentation: http://code.google.com/p/webforms2/

Usage: One must download the JavaScript library from the reference website above. Store the file in an appropriate location. Include a reference to the library using the <script> element. For example, <script type=’text/javascript’ src=’webforms2.js’></script>.  Now you are ready to try it out.
Example page: http://learning-html5.info/examples/ExampleForm6WF2.html – view the source code. In this example, I have two required form fields. Prior versions of Internet Explorer (including IE 9) will ignore this required attribute and submit the information to the server (whether there is information in the form field or not). However, after adding the reference to the WebForms2 library, the required fields must contain information. For comparative purposes, try out the following page using IE 9 (or earlier) and compare your experience with the above example.

Result: Below is a screen capture of a page using IE9

Internet Explorer Required attribute recognized

 

 

 

 

Here is the same page viewed in Firefox 4.

Firefox recognizes required attribute

 

 

 

 

Although there are small differences in the message, using WebForms 2.0, one can now include the required attribute and expect that browsers like IE will recognize it.

 

Leave a Reply

Your email address will not be published. Required fields are marked *