>
> I'm trying to pass some data from javascript in the view back to the 
> controller using json. I'm unsure how to do this correctly. I created a 
> util.js:


>
>  doPost({{=URL('default', 'add_item')}}, data);
>
>
Is util.js just a static JS file, or is it a web2py template served 
dynamically? If the former, then you cannot include web2py template code in 
it. If it is a template, then you probably need quotes around the URL 
(i.e., the quotes end up in the generated Javascript):

 doPost('{{=URL('default', 'add_item')}}', data);

Anthony

-- 

--- 
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/groups/opt_out.


Reply via email to