HTMLViewer: getting the text from an external URL

I am using an Academic website providing true random numbers. Each access returns a new quantum based random number. I want to use these numbers appearing in the HTMLViewer further in the app.For my DT implementation I used HTMLViewer.documentcomplete event with:

#IF targetMacOS then sampletxt = W_runs.HTMLViewer_Wruns.EvaluateJavaScriptMBS("document.body.innerText").Left(7) #else sampletxt =W_runs.HTMLviewer_Wruns.IETextMBS.Left(7) #ENDIF

Now I want to implement the web-version and WebHTMLViewer has no ‘documentcomplete’ event. So:

  1. how do I know the page has been loaded
  2. I am not sure these wonderful MBS plugins do work for the web (maybe if it is a Mac- or Windows webserver where the app resides or the XOJO Cloud?)

Thanks for any info.

why not just use a httpsocket or urlconnection and get the raw html source ?
it should then be simple enough to get the random number from that

The MBS Plugin can’t help with WebHTMLViewer.
But you can maybe run a JavaScript there to get the value.

Your best bet would be HTTPSocket.

For security reasons, you cannot access the content of WebHTMLViewer if it is not on the same domain as your app.