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 <script type="text/javascript">
instead of <script language="javascript"> 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 <script type="text/javascript">
instead of <script language="javascript"> you could try changing that
too.
<script type="text/javascript"> 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 ?
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 <script type="text/javascript">
instead of <script language="javascript"> you could try changing that
too.
<script type="text/javascript"> 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 ?
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.