You did not even to get the Script replied by the HTTP server
look into the Fancy Browser Example and search for evaluateJavaScript
Thus you can write your JavaScript into the Qt Application
If you want to start JavaScript in interaction with web sites use normal html event handling