I just got it, I just needed to include $ {h.javascript_include_tag('yui/build/connection/connection-min.js')} in my .mako file before including the datasource component. This makes the /controller/function map as expected. Thank you for your help and your quick responses.
On Nov 4, 1:47 pm, Christoph Haas <[EMAIL PROTECTED]> wrote: > On Sun, Nov 04, 2007 at 05:48:10PM -0000, JamesT wrote: > > I think it has to do with the route to the pylons controller/function > > from the javascript file. Is your javascript located in /public/ > > javascripts/? > > Yes. And in one case I load the Javascript from my HTML document like: > > <script src="/javascripts/foobar.js" type="text/javascript"> > > Mostly I have it contained in my Mako templates so the user's browser > doesn't need to do an extra HTTP request. > > > Mine is located here and my controller is in / > > controllers/player.py. Can i refer to the controller/function from the > > javacript file by using "/player/get_data" or must I do something > > else? > > No, that's fine. You tried that in the browser and as you say it worked. > A relative path is fine if you access it from the same site. And I > believe that doing AJAXy requests to other web sites is prohibited for > security reasons anyway. At least my browser refuses to do that. > > > @jsonify seems to work fine for the output of the function if I load / > > player/get_data in my browser. > > Then I suspect the YUI is not doing what you expect. Perhaps we have > some YUI experts here. > > Christoph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---