live_test: improve syntax of javascript code used for live tests
live_test: clearly decrease risk of not having result in web page

From time to time, it happened that after hitting button "run live test" the
result was not displayed even though the test was running. This hack should
clearly reduce the risk. If there is still issues from time to time, we will need
to improve design.