[Rails] Re: Inserting Javascript dinamically with DOM

2010-02-10 Thread Yuri Albuquerque
Why not just call the script file from a script tag instead of replace_html? In general, your JavaScript should be coming from static external files. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Well, now I tried. I have tried this on my view: script

[Rails] Re: Inserting Javascript dinamically with DOM

2010-02-10 Thread Marnen Laibow-Koser
Yuri Albuquerque wrote: Why not just call the script file from a script tag instead of replace_html? In general, your JavaScript should be coming from static external files. Best, --  Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Well, now I tried. I have tried this

[Rails] Re: Inserting Javascript dinamically with DOM

2010-02-09 Thread Marnen Laibow-Koser
Yuri Albuquerque wrote: I want to do simple stuff. In my controller I have this: render :update do |page| page.replace_html 'scripts', :partial = 'scripts', :locals = {:question = @question} end And in the partial I have this: % if question.sound % Sound loaded! script