My SQLFORM.grid is based on a table that includes a field defined as a 
textarea.  When I add a new record using the grid 'Add' button, I want to 
update that textarea using AJAX.

My test view looks like this:

{{extend 'layout.html'}}
<h2>{{=' '.join(x.capitalize() for x in request.function.split('_'))}}</h2>
<div id="target"></div>
{{=BEAUTIFY(form)}}
<hr>
{{=BEAUTIFY(grid)}}
<hr>
<form>
       <input name="name" onkeyup="ajax('echo', ['name'],
       'target')" />
</form>
{{if request.is_local:}}
{{=response.toolbar()}}
{{pass}}

The 'echo' function is just:

def echo():
    return request.vars.name


When the SQLFORM.grid is showing, the AJAX works as expected.

When I click on the Add button, typing into the form defined above causes 
the original grid to be displayed in the 'target' area, and the content of 
the 'name' form is not included.

Is it possible to use AJAX within the Add form from SQLFORM.grid?

Thanks,
Keith

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to