Login   Register  
Icontem

File: example.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Stephen Chapman  >  Form Generator  >  example.js  >  Download  
File: example.js
Role: Example script
Content type: text/plain
Description: example JavaScript
Class: Form Generator
Generate and layout HTML forms dynamically
Author: By
Last change:
Date: 2013-01-25 01:36
Size: 612 bytes
 

Contents

Class file image Download
var f = new Form('next.php','post','','My Form');
f.addHidden('firsthide','one');
f.addInput('text','Your Name','yname','Steve','r');
f.addInput('radio','Male','sex','M','c');
f.addInput('radio','Female','sex','F','');
f.addTextarea('Message','mess',45,3,'some text goes in here','');
f.addSelect('selection', 'mysel', 1, [['group one'], ['first choice - option one', 'oneone', ''], ['first choice - option two', 'onetwo', 's'], ['group two'], ['first choice - option three', 'onethree', ''], ['first choice - option four', 'onefour', '']], '');
f.addInput('submit','','go','Go','');
f.addForm('myform');