Hi Everybody, I am having a tough time in figuring out how to pass ''this'' java script keyword as a parameter to a java script function in page.call. For instance, in my RJS template I want to do this: page.call "myFunctionName", this Any help in much appreciated!!!!!!!! Thanks! -Amit. -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-May-25 20:41 UTC
Re: Passing ''this'' keyword as a parameter in page.call
On May 25, 8:49 pm, Rails Learner <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi Everybody, > > I am having a tough time in figuring out how to pass ''this'' java script > keyword as a parameter to a java script function in page.call. > > For instance, in my RJS template I want to do this: > page.call "myFunctionName", this >For starters you can use page << to insert an arbitrary fragment of javascript (and if you find yourself fighting rjs to much you may want to just drop it altogether). You could also try page.call ''foo'', page.literal(''this'') Fred> Any help in much appreciated!!!!!!!! > > Thanks! > -Amit. > -- > Posted viahttp://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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rails Learner
2010-May-26 13:22 UTC
Re: Passing ''this'' keyword as a parameter in page.call
Thanks Fred!!!! "page.literal(''this'')" did the trick. I am working on a fast track project and didn''t had much time to figure this out. I heartily appreciate your reply. Thanks a lot!!!!! -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.