Thursday, 15 August 2013

ruby on rails - Response of Jquery Ajax dont appear Screen, some in Firebug console -



ruby on rails - Response of Jquery Ajax dont appear Screen, some in Firebug console -

i making requisition in ajax whit rails , result of response correct, console of firebug appear this:

$("#cost_select").after("<select id="from_money" name="from_money"><option value="2">luz</option></select> ");

the problem dont appear, seek alter tag html , works fine, dont know dont appear select in screen can help ? need appear normal right variables , create dynamic content in rails.

you need escape javascript quotes escaped.

$("#cost_select").after("<%= escape_javascript select_tag('from_money', options_for_select(@places.map { |c| [c.place, c.id] })) %> ");

jquery ruby-on-rails ajax ruby-on-rails-3 ruby-on-rails-3.1

No comments:

Post a Comment