Getting input from user with http.onrequest

Is there a way to create code on the agent that will display a text box and allow the user to enter a value and submit that to the agent? I want to use the http handler and the address of the Imp (https://agent.electricimp.com/xxxxxxx) I am already displaying a table of values that get pulled from Xively but there is one value I need the user to enter and keep that value persistent on the agent. Thanks.

This thread has some code from my garage door project that returns HTML with a text input box. I use it as a password to open the door.

http://forums.electricimp.com/discussion/comment/12493#Comment_12493

Thanks, I used a lot of that code. I have the value I want coming back to the agent and then the Imp. What operation should I look for to make that persistent, even after agent/imp updates have been submitted? Also, after they submit the value, how can I make the browser refresh so the new setting shows up in the table? Thanks again.

You could store the values in a table on your agent. When the user submits input to your agent, just have the response to that request also include HTML, either a new string or just an updated one.

I have tried that but do not see the updated page. Will keep trying…

I also have my Ipod setup so I can see the web page and the shortcut is saved like an app similar to the other discussion. How do you get that page to refresh from the Ipod?

If your agent responds to each request with HTML, that should be what loads. Maybe post your http.onrequest function so we can see what is going on?