On 10/17/06, Rodrigo Tassinari <[EMAIL PROTECTED]> wrote: > > Hello all, > > I need to serve Javascript as the output of one action, instead of > regurlar HTML. The purpose is that i want to be able to call this > action from other pages outsite cake (in another domain) like so: > > <script src="http://mysite/controller/action" > type="text/javascript"></script> >
Hi Rodrigo, I think you may be able to do this by telling your controller that you wish to output things as Ajax instead of HTML. I do this in my Ajax-based controllers with the following line: $this->layout = 'ajax' I suppose you may be able to do different stuff like $this->layout = 'text' but I have not done anything like that. Hope that helps. -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never have." -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
