Fixing example

- sync with latest JS clients from liveOak
- Use innerHTML instead of document.write to have example working correctly in FF