Hello RoR developers, I want to see url path in alert message. exp, this is my url <%=url_for :controller=>''admin'', :action=>''admin2''%> I want to see the path in alert message when I click to button <input type="button" value="alert" onclick="try()"> I want to call that try() method by rjs, is it possible? thanks for any help. -- 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-/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 -~----------~----~----~----~------~----~------~--~---
On 23 Apr 2008, at 10:10, Lamer Lamer wrote:> > Hello RoR developers, > > I want to see url path in alert message. > > exp, > > this is my url > <%=url_for :controller=>''admin'', :action=>''admin2''%> > > I want to see the path in alert message when I click to button > > <input type="button" value="alert" onclick="try()"> > I want to call that try() method by rjs, >I believe try is a reserved word in javascript (used for try{} catch). Assuming your function is defined somewhere sensible (eg application.js), just page.call ''your_function'' should be enough. Fred> is it possible? > > thanks for any help. > -- > 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-/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 -~----------~----~----~----~------~----~------~--~---
> I believe try is a reserved word in javascript (used for try{} catch). > Assuming your function is defined somewhere sensible (eg > application.js), just > page.call ''your_function'' > should be enough. > > Fredthank you very much. -- 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-/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 -~----------~----~----~----~------~----~------~--~---