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

On Feb 21, 1:01 am, Alan Etkin <spame...@gmail.com> wrote:
> 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 <pradeeshnara...@gmail.com> 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 call a function (in another control file) using ajax from an
> > external JavaScript.

Reply via email to