Newbie question re fields --> javascript

David Bovill david at vaudevillecourt.tv
Tue Nov 9 03:18:52 EST 2010


Dave - as with "shell", "do" does a line - that is if you were to look at
the string you create with:

put "alert ('"  & myScore & "');"

it would span several lines. Imagine typing that into the script editor - it
would make no sense right? So you need to have the LiveCode as a single line
and not split over multiple lines like this. That is not to say the
Javascript / AppleScript etc has to be one line - so simply construct
multiline JavaScript that would work in an HTML file, get LiveCode to
produce this JavaScript and put it into a variable, then "do" the contents
of the variable in the browser.

On 8 November 2010 19:54, David Brooks <dbrooks at unlserve.unl.edu> wrote:

> We are creating standalones and launching them in browsers. We have issues
> with taking in all of a field. Any help appreciated.
>
> Works:
> on mouseUp
>   put "12131232" into myScore
>   do "alert ('"  & myScore & "');" in browser
> end mouseUp
>
>
>
> Does NOT work:
> on mouseUp
>   put fld "ListOfFiles" into myScore
>   do "alert ('"  & myScore & "');" in browser
> end mouseUp
>
>
> Works:
> on mouseUp
>   put line 1 of fld "ListOfFiles" into myScore
>   do "alert ('"  & myScore & "');" in browser
> end mouseUp
>
> WE seem to be able to put in just one line.
>
> Thanks in advance for your help.
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list