improvements + bugfixes

- added support for checkboxes, radio buttons, select boxes
- bugfixes
- updated the example file

Signed-off-by: Wouter Vroege <wouter@woutervroege.nl>
beautified js+example file

Signed-off-by: Wouter Vroege <wouter@woutervroege.nl>