ruby rails
2012-Nov-17 14:08 UTC
insert the javascript codes of another view returned from ajax to a view page
Hi, I am doing an jquery ajax call in my rails application and in the controller I am rendering it to a view page(where javascripts codes are written). Then I need to insert the response returned from the server to a DOM element. When I try to alert the server response (alert (data))I am getting it completely. But when I insert it into the dom element($(''#someid'').html(data)) it is not inserting it completely as it contains lot of javascript codes. So can anyone please tell me how to insert the javascript codes of another view returned from ajax to a view page?? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.