load URL

Mike Bonner bonnmike at gmail.com
Wed Nov 21 15:33:13 EST 2012


No it is not expected behavior.

If you use a script like so

*on* mouseUp

   *load* url "http://localhost:8888/testf.txt" with message "urlLoaded" --
loads async and calls message urlLoaded when done

*end* mouseUp


*command* urlLoaded pUrl,pStatus -- first var is the url in question, 2nd
var is the status.

   *put* "The status of url [[pUrl]] is [[pStatus]]" & cr  -- can check the
status of the url caching.

   put "The contents of url [[pUrl]] is" & cr after msg

   put url pUrl after msg

*end* urlLoaded


If it shows error for the status, either the name is wrong, or something
else possibly occurred.  If you are getting the correct contents by leaving
the .txt off of the URL then my gut feeling is that it really isn't
actually there on the server.  Either way, seeing what status you get back
from load will be a good start towards finding the  problem.


On Wed, Nov 21, 2012 at 10:48 AM, André Rombauts
<andre.rombauts at gmail.com>wrote:

> Use instead
> put URL "http://domain.tld/tesrt.txt" into field "Display", for instance
>
> Le 21 nov. 2012 à 18:22, Peter Haworth <pete at lcsql.com> a écrit :
>
> > I'm using load URL to download a simple text file from my web site; the
> > filename ends with ".txt".  If I include the ".txt" in the URL, the load
> > completes successfully but the cached URL is empty.  If I omit the ".txt"
> > from the URL, the cached URL shows the correct contents.
> >
> > IS this expected behavior?
> >
> > Pete
> > lcSQL Software <http://www.lcsql.com>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list