post variables to Javascript

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

post variables to Javascript

Post by YahooArchive »

Hey,

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

Thanks



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: post variables to Javascript

Post 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.

Post Reply