Quantcast
Viewing all articles
Browse latest Browse all 3852

Xojo and Javascript

I have no experience with Javascript I try to explain to my students how to access information on a webpage from a Xojo desktop app.

I have an input field on a webpage referenced with id = mt_organizationno". The page is open and available with HTMLViever1 (Class DesktopHTMLViewer). How can I get the information from the input field? This was my guess:

Var titlePage As String  = htmlviewer1.ExecuteJavaScriptSync("document.title")
MessageBox(titlePage)

Var organisationNumber As String htmlviewer1.ExecuteJavaScriptSync("document.GetElementById(""mt_organizationno"").Value")
Messagebox(organisationNumber)

The title is displayed correctly. However, the variable organisationNumber is empty. Is there an error in the Javascript sentence?

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3852

Trending Articles