Hello, My rjs is returning javascript to the browser, as it should. I am trying to replace the html inside of a div. How do I get it to display the code and not the script? http://pastie.caboo.se/88348 http://pastie.caboo.se/88373 Thanks! --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The answer is to render the partial directly without using rjs at all. On Aug 16, 9:03 pm, Mindtonic <mindto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > > My rjs is returning javascript to the browser, as it should. I am > trying to replace the html inside of a div. How do I get it to > display the code and not the script? > > http://pastie.caboo.se/88348 > > http://pastie.caboo.se/88373 > > Thanks!--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Also, in case anyone searches for this, to do an ajax call from radio buttons, write a very simple javascript that defines the value of a hidden field and use the hidden field to feed the value to the request: function doMe(value) { var hide = document.getElementById(''hiddenType'') hide.value = value } On Aug 16, 9:40 pm, Mindtonic <mindto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The answer is to render the partial directly without using rjs at all. > > On Aug 16, 9:03 pm, Mindtonic <mindto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello, > > > My rjs is returning javascript to the browser, as it should. I am > > trying to replace the html inside of a div. How do I get it to > > display the code and not the script? > > >http://pastie.caboo.se/88348 > > >http://pastie.caboo.se/88373 > > > Thanks!--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---