I want to pass a form input value to action before the user press the form submit button (before POST method is executed). My goal is this: the user fill one input field and when he goes to the second field, the python code in the server performs some computation (like guess user’s gender based in the first name he typed).
Is it possible using python gae and jinja2 html templates?
Thanks for any help!
Like Daniel said, you’ll need to use Javascript. You can define a handler on the server side, then bind a callback to the
inputorkeyupevent on your first field which uses AJAX to post the data to the backend and get the result. My favorite library for AJAX stuff is reqwest and I usually use bean for event handling, but many other people use jQuery for both.