PINK program help
Paul
Posts: 263
Hello, How do I get the PINK variable <NB_var01> into a JavaScript variable? I'm sure its simple but I have little experience in programming in HTML or JavaScript.
I've tried the following without success:
1. var·myvalue = document.getElementsByName('NB_var01').value; //undefined
2. window.status = <NB_var01>;· //errors out
Thanks, any help will be appreciated.
Paul
I've tried the following without success:
1. var·myvalue = document.getElementsByName('NB_var01').value; //undefined
2. window.status = <NB_var01>;· //errors out
Thanks, any help will be appreciated.
Paul
Comments
I have contacted the developer of the firmware to see if this is supported and how. I will post what I find. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thanks for sharing your success. This could help others in the future. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I decided to do a little playing around myself since one of my test applications is a remote security station. In order for it to work I need the web page to refresh every 5 seconds (very easy to do) and update the information on the page. But more importantly I need to detect when a variable is set to a certain value and cause the page to redirect. I am doing this with JavaScript and this required me to figure out how to get the variable into a JS variable. Please see the attached snippet from my PINK test page. I hope this helps someone out. Take care.
The above example jumps to Google when the variable <Nb_var00> changes to the word SEARCH. ·Note that this is exactly what I am using but it should get the point across.· Note also that you don't need the document.writeln section...I was using that to debug the variable information.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Post Edited (Chris Savage (Parallax)) : 6/20/2007 7:34:25 PM GMT
Paul
Doing it that way let’s you bring it right into the JavaScript variable…Nice and easy. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Doing it that way let’s you bring it right into the JavaScript variable…Nice and easy. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support