POSTing using PINK Module
Tom P
Posts: 97
I have been experimenting with the new PINK Netburner Kit #30013
It works great, except that I seem to have a problem with POST ing.
I tried the example below as shown in documentation but it desnot work as shown!!!
<html>
<FORM method = "post" action="/test.html">
<P>
What value would you like to input in Variable 01?
<INPUT name="Nb_var01"type="text"size="24"maxlength="63">
<INPUT type="Sumbit ">
</p>
</FORM>
</html>
On my created webpage
I seem to get two blank boxes instead of one and there is no submit query button shown on the screen and I can never update the variable in the vv_show.htm page.
Any suggestions !!!
Tom
Post Edited By Moderator (Chris Savage (Parallax)) : 6/29/2007 1:58:27 PM GMT
It works great, except that I seem to have a problem with POST ing.
I tried the example below as shown in documentation but it desnot work as shown!!!
<html>
<FORM method = "post" action="/test.html">
<P>
What value would you like to input in Variable 01?
<INPUT name="Nb_var01"type="text"size="24"maxlength="63">
<INPUT type="Sumbit ">
</p>
</FORM>
</html>
On my created webpage
I seem to get two blank boxes instead of one and there is no submit query button shown on the screen and I can never update the variable in the vv_show.htm page.
Any suggestions !!!
Tom
Post Edited By Moderator (Chris Savage (Parallax)) : 6/29/2007 1:58:27 PM GMT
Comments
<INPUT type="Sumbit "> --should be 'Submit'
Typically, <input type="submit" value="Submit"> is used.
I finally got it working fine ..... but....
I want to know if I can have more than 1 value collected as shown in the example.
I tried modifying the webpage to have more than 1 variable posted but couldn't get it to work.
So if I can collect more variables on the page, what would the text look like to collect more than 1 variable on page 7 of the PINK module instructions???
thanks
Tom
·· Try this snippet...It will show you how to set three variables at the same time as well as change the text on the submit button.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I have another question: -- example for reading variable into the STAMP 2 via web input
From the code snippit in the PINK :
NBVAR VAR byte
serout 8,396,[noparse][[/noparse]"!NB0R06"]
serin 7,396,[noparse][[/noparse]NBVAR]
Debug DEC NBVAR
Every time you update the input via the web, I have to restart the STAMP to read the chnaged value coming from the webpage. How can I make it so that I don't have to restart the STAMP after each webpage variable change???
thanks
Tom
The reason you have to keep restarting the program is because your code example only displays the current variable and ends. You don’t have it setup to keep checking for changes. Typically you would monitor the status bits to accomplish this. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I not sure I understand what you mean below----
You don’t have it setup to keep checking for changes. Typically you would monitor the status bits to accomplish this.
What do you mean monitor status bits?
Can you give an example of how to use the program mentioned or another example of how to read and update
Tom
The current documentation covers how to read the status bit from the BASIC Stamp Module. The listing of status bits shows that one is reserved for when a variable has changed. You will need to detect this change from your program and then reacquire the data to display. I don’t have a ready-made example for that. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
You state the documentation covers how to read the status bit of the STAMP. Do I assume you mean the STAMP documentation and not the PINK documentation. What are the status bits designated as in the STAMP 2 documentation? what are the symbols? clarify !
Page 9 and 10 of the PINK documentation has both examples listed. If you’re going to update items they need to be continually read, mainly the status bits. Unfortunately we cannot provide examples for every possible way to use the PINK Module so we provide the basic examples and customers will have to use those as an example to build what they need. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I will study the PINK document on page 9 and 10
thanks
Tom