Forum: Radiant CMS Ajax responses

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Db303dc84d03a992b33cd3ac978f89ae?d=identicon&s=25 Benjamin Curtis (Guest)
on 2007-05-04 19:47
(Received via mailing list)
I'm doing a custom page, and I'd like to respond to some Ajax
requests in my custom process method.  I haven't been able to find an
example of this yet, and I'm wondering if anyone who has done it
would like to volunteer a snippet of code as a guide.

--
Building an e-commerce site with Rails?
http://agilewebdevelopment.com/rails-ecommerce

Meet up at RailsConf:
http://railsconf2007.conferencemeetup.com/
8f93a872e399bc1353cc8d4e791d5401?d=identicon&s=25 Mislav MarohniÄ? (mislav)
on 2007-05-04 20:37
(Received via mailing list)
On 5/4/07, Benjamin Curtis <rails@bencurtis.com> wrote:
>
> I'm doing a custom page, and I'd like to respond to some Ajax
> requests in my custom process method.  I haven't been able to find an
> example of this yet, and I'm wondering if anyone who has done it
> would like to volunteer a snippet of code as a guide.


A "custom page" means you are extending Radiant with a custom
controller? If
so, implementing Ajax in your site will be trivial. Do you need help on
the
server side, or help with JavaScript? I can show you how to leverage the
Prototype framework real easy.
Db303dc84d03a992b33cd3ac978f89ae?d=identicon&s=25 Benjamin Curtis (Guest)
on 2007-05-04 20:41
(Received via mailing list)
On May 4, 2007, at 11:36 AM, Mislav Marohnić wrote:

> On 5/4/07, Benjamin Curtis <rails@bencurtis.com> wrote:
> I'm doing a custom page, and I'd like to respond to some Ajax
> requests in my custom process method.  I haven't been able to find an
> example of this yet, and I'm wondering if anyone who has done it
> would like to volunteer a snippet of code as a guide.
>
> A "custom page" means you are extending Radiant with a custom
> controller? If so, implementing Ajax in your site will be trivial.
> Do you need help on the server side, or help with JavaScript? I can
> show you how to leverage the Prototype framework real easy.

No, it's not a custom controller.  I may yet take that route, if I
must, but by "custom page" I meant I have created an extension that
has a model that inherits from Page and overrides process.
8802b1fa1b53e2197beea9454244f847?d=identicon&s=25 Sean Cribbs (Guest)
on 2007-05-04 20:48
(Received via mailing list)
Ben,

Your process method will have access to the request object.  If it's an
Ajax request, request.xhr? will return true.

Sean
This topic is locked and can not be replied to.