Hi mr freeze, My bad, I copied the wrong stuff in the previous post. This is actually how i did it: jQuery.ajax({ type: "POST", url: "{{=URL(r=request,c='default', f='user', args='login'}}", data: {}, success: success_callback, error: failure_callback });
But it did not work. On Sep 6, 3:05 am, "mr.freeze" <nat...@freezable.com> wrote: > I don't think your options are set correctly. Try this: > > jQuery.ajax({ > type: "POST", > url: "{{=URL(r=request,c='default', f='user', args='login'}}", > data: {}, > success: success_callback, > error: failure_callback > }); > > On Sep 5, 6:47 pm, eddwinston <eddwins...@gmail.com> wrote: > > > Hi, > > > I tried creating the url like this because it is in the view: {{=URL > > (r=request,c='default', f='user', args='login')}} but it does not > > work. > > > I used the jquery ajax method: jQuery.ajax("{{=URL > > (r=request,c='default', f='user', args='login')}}", {}, > > success_callback, failure_callback); > > > I passed {} inplace of data. > > > On Sep 5, 11:55 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > Yes the url is > > > > URL(r=request,c='default', f='user', args='login') > > > > or > > > > {{=URL(r=request,c='default', f='user', args='login')}} > > > > if in the view. > > > > On Sep 5, 1:48 pm, eddwinston <eddwins...@gmail.com> wrote: > > > > > Hi, > > > > > From the login form generated by web2py, if I intercept the submit > > > > event so I can make an ajax request to the server, the request URL I > > > > guess will be /[application]/user/login. Then what will be the > > > > possible parameters? > > > > > Or should the request URL be something like this: URL(r=request, > > > > c='default', f='user', args='login'). I am a bit confused > > > > > Regards, > > > > Winston --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---