Page 1 of 1
browser widget to view local html file
Posted: Mon Jul 18, 2016 1:33 pm
by malee
i tried to get the new browser widget to view local html file on android but failed , it works on window desktop . i searched this forum and found someone with similar issue but couldn't get it solved, upload the a zip stack
here is the code for the on opencard
Code: Select all
set the URL of widget "MyBrowser" to ("file://" & specialFolderPath("resources") & "/info.html")
Re: browser widget to view local html file
Posted: Tue Jul 26, 2016 5:05 pm
by MaxV
for local files use the
htmlText property like this:
Code: Select all
put URL ("file://" & specialFolderPath("resources") & "/info.html") into temp
set the htmlText of of widget "MyBrowser" to temp
Re: browser widget to view local html file
Posted: Sun Jan 24, 2021 12:17 pm
by bogs
I realize this is a 4 year old post, but it was the top search result for what I recently was looking up, so I am going to add an answer to what I think was wrong here.
malee wrote: ↑Mon Jul 18, 2016 1:33 pm
i tried to get the new browser widget to view local html file on android but failed , it works on window desktop . i searched this forum and found someone with similar issue but couldn't get it solved, upload the a zip stack
here is the code for the on opencard
set the URL of widget "MyBrowser" to ("file:
//" & specialFolderPath("resources") & "/info.html")
As far as I know (but I could be VERY wrong), you don't put forward slashes preceeding specialFolderPath statements, and, even if you did, you would not use 2 of them as a single slash indicates the root level of the file system.
Changing the above code to read -
Code: Select all
set the URL of widget "Browser" to "file:" & specialFolderPath("resources") & "/info.html")
I am pretty sure would fix the issue.