[web2py] Re: unable to call ajax url from external javascript.

2013-02-24 Thread zhongliang liang
Emmm I'm not sure you can do this in external js files. URL(...) and "{{ ... }}" markup are python helpers defined in web2py, they are only visible in python controller files and view files that will be rendered by web2py framework. Static external js files are only plain js, which wont be

[web2py] Re: unable to call ajax url from external javascript.

2012-02-20 Thread Vineet
In your statement -- ajax("{{=URL(r=request,c='control2',f='function1')}}"['name'],'target'); comma is missing after URL and before ['name']. Check whether it is a typo or otherwise. Secondly, double check whether the external js file is included in the header section of layout.html -- Vineet O

[web2py] Re: unable to call ajax url from external javascript.

2012-02-20 Thread Vineet
In your statement -- ajax("{{=URL(r=request,c='control2',f='function1')}}"['name'],'target'); comma is missing after URL and before ['name']. Check whether it is a typo or otherwise. -- Vineet On Feb 21, 1:01 am, Alan Etkin wrote: > Maybe wrapping the code in jQuery(document).ready() the execut

[web2py] Re: unable to call ajax url from external javascript.

2012-02-20 Thread Alan Etkin
Maybe wrapping the code in jQuery(document).ready() the execution is delayed enough time for the web2py functions to be read. On 20 feb, 12:08, Pradeesh wrote: > I am new to web2py. > form my view i am able to call web2py ajax as " > ajax("{{=URL(r=request,c='control2',f='function1')}}"['name'],'

[web2py] Re: unable to call ajax url from external javascript.

2012-02-20 Thread Anthony
On Monday, February 20, 2012 10:08:42 AM UTC-5, Pradeesh wrote: > > I am new to web2py. > form my view i am able to call web2py ajax as " > ajax("{{=URL(r=request,c='control2',f='function1')}}"['name'],'target'); > ". But the same command is not working from an external javascript. > How can i