Javascript block within partial not executed after partial gets rendered -- Rails 3 -
when rendering partials, javascript blocks within partial supposed executed?
for instance, assume inside "_partial_exmaple.html.erb" call alert().
when render partial inside view, alert invoked?
if so, i'm doing wrong javascript blocks contained inside partial not getting executed.
inside "viewa.html.erb":
<%= render :partial => 'partiala' %>
inside "_partiala.html.erb":
<script type="text/javascript"> alert('hi'); </script>
the alert function display "hi" not getting executed.
it sounds have javascript error somewhere before line of code, halting javascript execution. use browser's javascript console check errors.
in chrome: view -> developer -> javascript console
Comments
Post a Comment