Local files in revBrowser
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu Jun 9 09:37:08 EDT 2011
Hi John,
Here are a few clues. If I remember correctly, IE encodes URLs by itself while it may be useful to do this explicitly for WebKit (Safari). While file:/// seems correct on WebKit, you might want to try file://C:\... on IE. Just open an html file directly in IE and see what the address starts with. On Mac, I urlEncode the address and replace %2F with slash and %3A with colon or I build the URL up to the data part (x=a&y=b) and urlEncode the data part separately. After urlEncoding, I also replace + with %20. On Windows, I just keep the original address.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce
On 9 jun 2011, at 14:03, John Dixon wrote:
>
> I wonder if someone could shed some light on a problem I am having. The script below works fine running under MacOSX, but it does not want to work running under Windows ?..
>
> If having the stack would help, I would send it to you.
>
> I am really stumped... any help would be appreciated.
>
> local browserID
>
> on preOpenStack
> set itemDel to "/"
> set the defaultfolder to item 1 to -2 of (the effective fileName of this stack)
> set the loc of this stack to screenLoc()
> end preOpenStack
>
> on openCard
> /* get the path to the html file */
> put the defaultFolder & "/mapFolder/map.html" into adJustWindows
>
> /* replace the spaces, if there are any, in the URL filepath */
> replace space with "%20" in adjustWindows
>
> /* set up the browser instance */
> put revBrowserOpen (the windowId of this stack, "file:///" & adjustWindows) into browserID
> revBrowserSet browserID, "scrollbars", false
> revBrowserSet browserID, "showborder", true
> revBrowserSet browserID, "rect",rect of image "browserimage"
> end openCard
>
> on resizeStack
> /* keep the browser 16 pxs from the bottom to be able to get to the resize window box */
> set the rect of image "browserImage" to 0, 0 & "," & (the width of this stack) & "," & (the height of this stack -16 )
> revBrowserSet browserID, "rect", rect of image "browserImage"
> pass resizeStack
> end resizeStack
>
> on closeCard
> /* destroy the browser instance when the card closes */
> if browserID is not empty then revBrowserClose browserID
> end closeCard
>
> take care,
>
> Dixie
>
More information about the use-livecode
mailing list