Amit Tomar
2010-Oct-23 05:48 UTC
is it poosible to return javascript''s confirmbox response to ruby programme
Hii all, Sorry if it looks stupid question but i would like to know is it possible to return response of javascript''s confirmbox or messagebox to ruby programme as a value .Means suppose i click on confirmbox''s yes tab this respone stored in a variable and this variable is returned to ruby programme where i call javascrpt ?? -- 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.
Erol Fornoles
2010-Oct-23 07:50 UTC
Re: is it poosible to return javascript''s confirmbox response to ruby programme
On Sat, Oct 23, 2010 at 1:48 PM, Amit Tomar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hii all, > Sorry if it looks stupid question but i would like to know is it > possible to return response of javascript''s confirmbox or messagebox to > ruby programme as a value .Means suppose i click on confirmbox''s yes tab > this respone stored in a variable and this variable is returned to ruby > programme where i call javascrpt ?? >With AJAX, yes. -- Erol M. Fornoles http://erolfornoles.posterous.com http://github.com/Erol http://twitter.com/erolfornoles http://ph.linkedin.com/in/erolfornoles -- 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.
Walter Lee Davis
2010-Oct-23 13:28 UTC
Re: is it poosible to return javascript''s confirmbox response to ruby programme
On Oct 23, 2010, at 1:48 AM, Amit Tomar wrote:> Hii all, > Sorry if it looks stupid question but i would like to know is > it > possible to return response of javascript''s confirmbox or > messagebox to > ruby programme as a value .Means suppose i click on confirmbox''s yes > tab > this respone stored in a variable and this variable is returned to > ruby > programme where i call javascrpt ?? >If you make that confirm statement return into a function that sends an Ajax request, or simply a normal full-page request to a URL, then sure. Here''s the most basic example of what I mean: <a href="/model/action/id" onclick="return confirm(''Do you really mean it?'');">Play Global Thermonuclear War</a> If the confirm returns false, then the onclick event dies in place, and your URL is not requested by the browser. Walter -- 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.
Amit Tomar
2010-Oct-24 05:51 UTC
Re: is it poosible to return javascript''s confirmbox response to ruby programme
Walter Davis wrote in post #956547:> On Oct 23, 2010, at 1:48 AM, Amit Tomar wrote: > >> > If you make that confirm statement return into a function that sends > an Ajax request, or simply a normal full-page request to a URL, then > sure. Here''s the most basic example of what I mean: > > <a href="/model/action/id" onclick="return confirm(''Do you really mean > it?'');">Play Global Thermonuclear War</a> > > If the confirm returns false, then the onclick event dies in place, > and your URL is not requested by the browser. > > WalterThanks Walter for your response but is it possible to achieve what i want http://www.ruby-forum.com/topic/275695#new In given code i would like to call javascript instead of that win32 messagebox and that js confirmbox response''s in my ruby programme -- 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.
Walter Lee Davis
2010-Oct-24 14:02 UTC
Re: Re: is it poosible to return javascript''s confirmbox response to ruby programme
On Oct 24, 2010, at 1:51 AM, Amit Tomar wrote:> Walter Davis wrote in post #956547: >> On Oct 23, 2010, at 1:48 AM, Amit Tomar wrote: >> >>> >> If you make that confirm statement return into a function that sends >> an Ajax request, or simply a normal full-page request to a URL, then >> sure. Here''s the most basic example of what I mean: >> >> <a href="/model/action/id" onclick="return confirm(''Do you really >> mean >> it?'');">Play Global Thermonuclear War</a> >> >> If the confirm returns false, then the onclick event dies in place, >> and your URL is not requested by the browser. >> >> Walter > > Thanks Walter for your response but is it possible to achieve what i > want > > http://www.ruby-forum.com/topic/275695#new > > In given code i would like to call javascript instead of that win32 > messagebox and that js confirmbox response''s in my ruby programmeAre you running this on a Web server? It sure doesn''t look like it from here. What is your environment, and why is this in Rails if it''s talking to a Windows filesystem directly? Walter -- 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.