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 ??

On Sat, Oct 23, 2010 at 1:48 PM, Amit T. [email protected]
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

On Oct 23, 2010, at 1:48 AM, Amit T. 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:

Play Global Thermonuclear War

If the confirm returns false, then the onclick event dies in place,
and your URL is not requested by the browser.

Walter

Walter D. wrote in post #956547:

On Oct 23, 2010, at 1:48 AM, Amit T. 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:

Play Global Thermonuclear War

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 programme

On Oct 24, 2010, at 1:51 AM, Amit T. wrote:

it?’);">Play Global Thermonuclear War

In given code i would like to call javascript instead of that win32
messagebox and that js confirmbox response’s in my ruby programme

Are 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs