HI there,

I haven't done anything with AJAX but I thing the AJAX request has  
something special, like 'content-type:text/xml', or with MooTools HTTP- 
Accept-Header "text/javascript".

You could write a route, which looks for something like this in the  
request headers and then switches the output type to ajax or json...  
whatever you'll call the output type.
Then agavi will run the Module and Action requested as normal, but in  
the View It will call the executeAjax or executeJson and you then send  
back the data your request needs.

The Sample App has an example for Json as output type 
http://trac.agavi.org/browser/branches/1.0/samples/app/config/output_types.xml#L56
 
  and an example for the routing 
http://trac.agavi.org/browser/branches/1.0/samples/app/config/routing.xml#L13

Hope this will help you a litte

Cheers and merry christmas

Benjamin

Am 24.12.2008 um 19:09 schrieb [email protected]:

>> Date: Tue, 23 Dec 2008 16:13:55 +0100
>> From: Felix Gilcher <[email protected]>
>> Subject: Re: [Agavi-Users] Ajax in Agavi
>>
>> Hi,
>> what do you mean by 'AJAX libraries'? The serverside support or the
>> client side javascript libs? Agavi deliberately includes no client
>> side libs, so that you're free to choose your own.
>
> CakePHP has something called an AJAX Helper - I assume that is
> server-side? Does Agavi include something similar? Or is there any
> example online you could direct me to which demonstrates an AJAX
> operation under Agavi?
>
> I'm basically trying to implement an AJAX autocomplete function within
> one of my Agavi forms and looking for some direction/examples of how
> this can be done (not the auto-complete part - I have that code - but
> the client/server interaction).
>
> TIA,
>
> Vikram
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to