def index():
    return dict()

def process():
    return request.vars.test.upper()

#index.html
{{extend 'layout.html'}}

<input name="test"/>
<div id="target"><div>
<button onclick="ajax('{{=URL(r=request,f='process')}}',
['test'],'target')">click me</button>

On Jun 19, 5:42 am, ilovesss2004 <[email protected]> wrote:
> Hi,
> How can I let python controller get the value of a textfield when I
> press a button in html page (not a submit button)?
>
> Thanks a lot.

Reply via email to