Added ability to detect the containing form in javascript
Added better usage instructions