WebViewer button alert not working


Is it because I'm opening it as a file, instead of opening it on localhost path?
What would be localhost path in this case?

I tried http://localhost/userText.html in above example as well, but it gave 404 Not found error.
if we load the usertext.html in webviewer under http path, it works with java script, else it loads as a read only display file

I guess this is the same issue