how to load a local file into the browser widget?
tore.nilsen at me.com
Fri May 24 16:05:37 EDT 2019
You must make sure that the filePath to the html file you would like to see does not contain any invalid characters like spaces, which you will find is OK by the file system but not with the browser.
> 24. mai 2019 kl. 22:02 skrev Curt Ford via use-livecode <use-livecode at lists.runrev.com>:
> Is there a trick to getting a local html file to display in the browser widget? I'm using this in a test button (in 9.0.4, on a Mac):
> *# set the defaultFolder to the folder containing the stackfile*
> set*thedefaultFoldertoitem1to-2 ofit*
> answer*"defaultFolder is"&& thedefaultFolder
> *if* thereisafile"Future.html"*then**
> answer*"OK, it's there"*
> answer*"not found!"*
> end* *if*
> *put*"file:/"& thedefaultFolder& slash& "Future.html"intotFile*
> answer*"the URL is"&& theURLofwidget"Browser"
> The .html file is in the same folder with the stack file, and in the standalone I've copied it into the bundle & the stack seems to find it, but nothing displays in the widget, both in IDE and the standalone. Loading a remote location works fine with
> Is there something else to keep in mind when displaying a local file?
> Sent from Postbox <https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach>
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode