On Jan 27, 2008 3:02 PM, Jean-Philippe Encausse <[EMAIL PROTECTED]> wrote:
> 1. I call a script Event.observe(window, 'load', ... > 2.1 I generate <script></script> under a given Id im not entirely sure what you mean here, can you be more specific? for example, are you dynamically creating a <script> tag and inserting it into the dom to create functionality once the page has been loaded on the client system? 2.1.1 with InnerHTML it do not work try Element.insert(); http://www.prototypejs.org/api/element/insert > 2.1.2 with dom elments it works but override the full page hmm; is the container element properly closed in the dom? 2.2 Using Ajax.Updater it seems connection fails verify the url is valid. check the response code from the server. look into firebug. - What is the best practice tounderstand why the connection is refused ? you need to verify the url you are requesting is legitimate. you can paste the url in the browser and see if you get a response. you may not even be contacting the webserver, depending on the url. if you are contacting the webserver, you should look at the response code. this will give you insight as to why the server could not respond w/ a valid resource. have you worked with firebug for firefox, it allows you to monitor ajax calls. > - What is the best pratice to include a <script> tag in a given place > of the DOM ? If you mean dynamically, during an Ajax request, then Ajax.Updater will run anything enclosed in <script> tags (in the response) through a call to eval(), provided you set the Ajax option, evalScripts to true when you instantiate Ajax.Updater. -nathan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
