-->
Page 1 of 1

HOW TO EXCHANGE NEW VARIABLES TO BASIC & JAVASCRIPT?

PostPosted: Fri Apr 16, 2021 2:01 am
by kabirbunny
I'm attempting to do the accompanying
In fundamental I have a variable suppose x
How would I access that variable with Javascript let javascript play out certain activities on it allow Basic to get the outcome back from javascript

Any thoughts ???
Any model please

Re: HOW TO EXCHANGE NEW VARIABLES TO BASIC & JAVASCRIPT?

PostPosted: Fri Apr 16, 2021 8:21 pm
by Mmiscool
See the docs for MSGBRANCH
https://docs.google.com/document/d/1EiY ... 6ep3w7frt5

Use ajax to perform the action of passing information from javascript.
https://plainjs.com/javascript/ajax/sen ... quests-47/

you can pass information to the esp by forming the URL and return a response of what ever you want. Example of a URL http://IPaddress/msg?color=red

See this example.

http://www.esp8266basic.com/msg-url-usage.html



Here is a thread implementing a custom web page for a user interface and using msgbranch.
viewtopic.php?f=40&t=14564

Re: HOW TO EXCHANGE NEW VARIABLES TO BASIC & JAVASCRIPT?

PostPosted: Sat Jul 17, 2021 6:25 am
by paulmicky57
Thanks for the clarification.