Question about command revGoURL
Sarah Reichelt
sarahr at genesearch.com.au
Mon Aug 2 23:11:48 EDT 2004
> thank you Judy for your respond and I try to explain what I'm doing. I
> want
> to open HTML file that is located on my local Hard Drive. This file is
> "myFile.htm". The absolute path to this my file is /Macintosh HD/Mac
> temp/data/myFile.htm, this path contains 2 spaces in name of folders
> "Macintosh HD" and "Mac temp".
>
> Than if I write:
>
> revGoURL myDataFolder & "myFile.htm"
>
> -- myDataFolder contains the path on local HardDrive (=/Macintosh
> HD/Mac
> temp/data) to file "myFile.htm"
> -- myFile.htm is file in folder data on local Hard Disk, that I want
> to open
> in Internet Explorer (or other default browser).
>
> After the Internet Explorer is open, one is looking for file with path:
> Macintosh%20HD/Mac%20temp/data/myFile.htm. This path doesn't exist.
>
>
With revGoURL, you have to tell the system what sort of URL you are
using. If you put:
revGoURL "http://" & myDataFolder & "myFile.htm"
it will know that you want to open the file in the browser.
Internet Explorer always puts "%20" in place of any spaces in the path.
Check out the URLencode & URLdecode functions for how to do this
yourself although you shouldn't need to.
Finally, if the file still won;t open, it is nearly always a path
error. Try putting this in the message box and pressing Enter:
answer file "Select htm file:"; put it
This will show you the exact path for the file you want to load and you
can check whether you are building the file path correctly in your
script.
Cheers,
Sarah
More information about the use-livecode
mailing list