Page 1 of 1

post variables to Javascript

Posted: Fri Jan 18, 2013 5:09 pm
by YahooArchive
Hey,

Is it possible to pass variables from ARMweb BASIC code to javascript?

Thanks

Re: post variables to Javascript

Posted: Fri Jan 18, 2013 5:15 pm
by YahooArchive
> Is it possible to pass variables from ARMweb BASIC code to javascript?

Lots of ways to do this.

The webpage html that the ARMweb serves is just text to the ARMweb, except for
constructs inside





When the ARMweb gets to this, it compiles and runs that BASIC code, and any
result of a PRINT in that code goes out to the client as part of the webpage.

So you can have things like


"
PRINT "document.write(";chr(34);The sky is the limit.";chr(34);");"
PRINT " "
?>

Yes a bit clunky with ;chr(34); to get what other languages do as a \"

VB doesn't seem to have that type of a construct, ARMbasic does not as of yet,
but it might be a good enough reason to add an extension.