Page 2 of 2

Re: How to display local html page in browser control

Posted: Tue Mar 29, 2011 3:18 am
by landoke
Hi Joel,

You might try doing some of this via javascript in the iOS browser, and have it call a url on touch events, which you then catch. It's a bit hacky, but it might do what you're looking for.

To catch an event, you can use something like this, but make sure to: set iphoneControlSet sBrowserId, "delayRequests", "true"

(That last part evaded me and drove me crazy for a while.)

Code: Select all

on browserLoadRequest pUrl, pReason
    if pUrl contains "?myUniqueCode=" then
        put char offset("?myUniqueCode=",14) to -1 of pUrl into pCode
        -- Do something with pCode
    else
        pass browserLoadRequest
    end if
end browserLoadRequest
Just have the javascript issue the following on an e touch event:

window.location = 'http : / / example . com/?myUniqueCode=' + myEvent;

Re: How to display local html page in browser control

Posted: Tue Mar 29, 2011 12:52 pm
by jstarkman
Thanks, I'll give this a try. I'm pretty green at this stuff, but I persist, so I'll do my best.

Thanks again,

J