As far as I'm aware, web.py can't do this without templating, because the input html is actually on the browser, therefore web.py doesn't have any idea what's happening in the client until you post the data back.
I presume what you're wanting to do is have access to 'fname' by using a form post? Form posts are still an accepted way of getting input from the browser to the server, but I never use them, always opting to use Ajax. When you use Ajax, the function on the server that receives the data gets all your form values as arguments. Whether a form post or an ajax post, on the server side it's the same - those values will come to the function you posted to as either web.input or web.data (depending on your HTTP method and the payload). On Sat, Oct 25, 2014 at 5:52 PM, Eric Outridge <[email protected]> wrote: > Is it possible for web.py to reference an html element? > for example > > index.html has the code: > <input type="text" name="fname" value="John"> > > Does web.py have any method for referencing "fname" and changing/getting > its value without having to use web.py's templating language or having to > render it with Textbox(name="fname", value="John").render()? > > Thank you in advance for any response. > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/webpy. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/webpy. For more options, visit https://groups.google.com/d/optout.
