You have to instruct prototype to evalulate the script tags of the xhr
response. afaik, by default, the response is only evaluated if the
mimetype is javascript. but I’m not sure so I suggest you to look it up
in the prototype api and the rails prototype helpers.
Since rails javascript helpers generate
instead of you could try changing that
too.
works when html is rendered but not js.
I've to adapt the method depending on the mime type of the response, but
i'm in the dark: i can't find any doc on this do you know any paper
where the response object is described ?
Nico
You have to instruct prototype to evalulate the script tags of the xhr
response. afaik, by default, the response is only evaluated if the
mimetype is javascript. but I’m not sure so I suggest you to look it up
in the prototype api and the rails prototype helpers.
Since rails javascript helpers generate
instead of you could try changing that
too.
You have to instruct prototype to evalulate the script tags of the xhr
response. afaik, by default, the response is only evaluated if the
mimetype is javascript. but I’m not sure so I suggest you to look it up
in the prototype api and the rails prototype helpers.
Since rails javascript helpers generate ” unless response.headers[‘Content-Type’]
== ‘text/javascript’
end
so you’re rendering an rjs template as response and want to add
additional js code using a filter? Phew I don’t think that is possible
without any code in the rjs.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.