Hi, I followed the js code in firebug, the url passed to ajax() is 'submit_comment', and I dont konw why the data posted to people().
I fixed this issue by modify the url to ajax(): ajax("{{=URL(f='submit_comment')}}",['hidden_id', 'hidden_author', 'hidden_text'],'comment_list_'+id); the url passed to ajax() is "/appname/default/submit_comment". On Thu, Feb 24, 2011 at 9:57 PM, DenesL <denes1...@yahoo.ca> wrote: > > Hi, > > I don't see anything wrong. > Can you post more of your code?. > > > On Feb 24, 6:19 am, zhao peng <zhaopen...@gmail.com> wrote: >> hi, >> >> I defined two functions in controllers/default.py: >> def submit_comment(): >> ..... >> >> def people(): >> ... >> >> and in the default/people.html, I want to use ajax to post data to >> submit_comment(): >> ajax('submit_comment',['id', 'author', 'text'],'comment_list_'+id); >> >> but by my testing, the ajax() posts data to people(). Can someone >> help me? thanks.