How can I browse html file from local path?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
minus
Posts: 1
Joined: Sun Apr 06, 2014 7:58 pm

How can I browse html file from local path?

Post by minus » Sun Apr 06, 2014 8:15 pm

Hi,
I am new in livecode. I need a code about browsing local html file with livecode.

Thank you for your help.

Regards

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: How can I browse html file from local path?

Post by dave.kilroy » Sun Apr 06, 2014 8:40 pm

Hi minus and welcome to the forum

I just did a quick Google search for "livecode local html file" and got a load of results - in particular there is this one which is yet another excellent article from Brigham Young University on html and LiveCode (about two-thirds way down the page they discuss getting local html files)

As well as Google I recommend spending time on LiveCode's tutorials ... and just practicing practicing practicing :)
"...this is not the code you are looking for..."

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: How can I browse html file from local path?

Post by Jellicle » Tue Apr 08, 2014 8:11 am

I'll leave it to you to find out how to make a browser control. When you've got that sorted out, do this:

put (specialfolderpath ("Documents") & "/localfile.html") into theURL
replace " " with "%20" in theURL -- weird, but required
mobileControlSet "Browser", "url", theURL

The above assumes a browser control called "Browser" and a file named localfile.html in the Documents folder for your app on the device or simulator.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply