iOS Question show a gauge in html page with javascript code in webview

icanet

New Member
Licensed User
Longtime User
I have a html page with some javascript code that show a gauge
i can show it in a webview using loadurl from a local file

How can i update the gauge value (variable in javascript) reading a variable defined in Global B4i ?

Thanks in advance

Marco Piai
 
Last edited:

icanet

New Member
Licensed User
Longtime User
I have solved
I read the file as a text and i replace the value before load the page as loadhtml
in the html page i have insered a placeholder for the 2 value that i need to change
example:
<gaugetitle> and <gaugevalue>

replace value in html page:
Dim pagehtml as String
Dim title as String
Dim value as Int
pagehtml = File.ReadString(File.Dirassets,"gauge.html").replace("<gaugetitle>",title).replace("<gaugevalue>",value)

WebWiew1.loadhtml(pagehtml)

if anyone have different solution, please tell me

Marco
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Now another issue.
You should start a new thread for yany new problem/question you have.

Posting multiple questions in the same thread is a mistake; one Thread should summarize one question.
 
Upvote 0
Top