Shop OBEX P1 Docs P2 Docs Learn Events
POSTing using PINK Module — Parallax Forums

POSTing using PINK Module

Tom PTom P Posts: 97
edited 2007-07-03 17:53 in BASIC Stamp
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

Comments

  • LSBLSB Posts: 175
    edited 2007-06-29 12:35
    I beleive the problem is here:

    <INPUT type="Sumbit "> --should be 'Submit'

    Typically, <input type="submit" value="Submit"> is used.
  • Tom PTom P Posts: 97
    edited 2007-07-02 13:09
    Thanks, I needed a new set of eyes!
    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
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-07-02 14:49
    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.
    <html>
    <FORM method="post">
    <P>
    What value would you like stored in these variables?</P>
    <P>
    01&nbsp;<INPUT name="Nb_var01"type="text"size="24"maxlength="63"></P>
    <P>
    02&nbsp;<INPUT name="Nb_var02"type="text"size="24"maxlength="63"></P>
    <P>
    03&nbsp;<INPUT name="Nb_var03"type="text"size="24"maxlength="63"></P>
    <P>
    &nbsp;<INPUT type="submit" value = "Send"> 
    </P>
    </FORM>
    </html>
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Tom PTom P Posts: 97
    edited 2007-07-02 18:50
    Thanks Chris the code snippit above worked fine.
    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
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-07-02 20:12
    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
  • Tom PTom P Posts: 97
    edited 2007-07-02 20:57
    Chris:
    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
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-07-02 21:48
    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
  • Tom PTom P Posts: 97
    edited 2007-07-03 10:59
    Chris:

    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 !
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-07-03 15:14
    Tom,

    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
  • Tom PTom P Posts: 97
    edited 2007-07-03 17:53
    I didn't realize that you were talking about the PINK's status register NB_varST, and not a STAMP register.

    I will study the PINK document on page 9 and 10
    thanks
    Tom
Sign In or Register to comment.