make the javascript hookable
refactor success handler to extract message creation
add documentation for new javascript functionality
Merge pull request #19 from RegioHelden/master

Make javascript extendable and refactor success handler