Seems that
"reponse.js" is never called.
I see in firebug
post to http://localhost:8000/ajax/default/post_message.load
X-Powered-By|web2py
|web2py-component-flash|"Form You"
|Set-Cookie|session_id_ajax=127.0.0.1-7a4406f9-01c9-46ab-ad14-4d83978d4d69;
Path=/
|Expires|Fri, 20 May 2011 18:50:53 GMT|
Pragma|no-cache|
Cache-Control|no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|web2py-component-command|"web2py_component(\"/ajax/default/list_message.load\",\"list_message\")"|
Content-Type|text/html; charset=utf-8
|Date|Fri, 20 May 2011 18:50:53 GMT
|Server|Rocket 1.2.2 Python/2.7.1
|Content-Length|699
|Connection|keep-alive|
On 5/20/11 10:45 AM, Massimo Di Pierro wrote:
what's the view?
On May 20, 9:26 am, "David J."<[email protected]> wrote:
I saw the video on creating components;
I tried following the steps outline there;
For some reasons I must have missed a step because the message post
table is not uploading;
Here is the code I think is not working correctly.
def reload(target):
def js(form):
response.js = 'web2py_component("%s","%s")' % (URL(target),target)
return js
def posts():
postform = SQLFORM(db.posts,onaccept=reload('post_text'))
I changed the example a bit from the one you used because you used a
Crud Form; but I just used SQLFORM instead which shouldn't really matter.
Thanks.