Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Getting user input from user on a webpage?

Reply
Thread Tools

Getting user input from user on a webpage?

 
 
Adam Lee
Guest
Posts: n/a
 
      06-10-2009
Hello, I was wondering if there is a way for a ruby script to get a user
input when it's running on a webserver. I need a basic function like
where there user can click on a button on a website which will invoke a
method.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Mike Stephens
Guest
Posts: n/a
 
      06-10-2009
When you saying "it's running a web server", what caused it to run?
Normally you'd expect a user message (eg HTTP GET from a web page) to
trigger the script. The web server would run the script using the HTTP
variables.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Adam Lee
Guest
Posts: n/a
 
      06-10-2009
Mike Stephens wrote:
> When you saying "it's running a web server", what caused it to run?
> Normally you'd expect a user message (eg HTTP GET from a web page) to
> trigger the script. The web server would run the script using the HTTP
> variables.


Hm can you briefly show me an example how I can pass a variable to a
script using HTTP GET? I think I'm almost there with your tip!!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Mike Stephens
Guest
Posts: n/a
 
      06-10-2009
How you pick up what the user has typed in the web page will depend on
the server you are running. For example in the Ruby CGI class you can
ask for individual fields or access them all with CGI#params. Have a
look at the Pickaxe book which I think is now bundled with the Ruby
download.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Adam Lee
Guest
Posts: n/a
 
      06-10-2009
Never realized the Pickaxe book is available for free. Although there is
a new version, I think the fundamentals are the same. Thanks for the
pointer

Mike Stephens wrote:
> How you pick up what the user has typed in the web page will depend on
> the server you are running. For example in the Ruby CGI class you can
> ask for individual fields or access them all with CGI#params. Have a
> look at the Pickaxe book which I think is now bundled with the Ruby
> download.


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering strings as user input but interpreting as Python input (sortof) Chris Carlen Python 1 09-18-2007 01:58 AM
how to restrict user from input in <input type="file"> Tarkeshwar Javascript 2 04-17-2006 11:44 AM
Getting User Input after getting Input from a file dei3cmix@uga.edu C++ 3 03-23-2006 05:01 AM
can I use scanf to get input (some times user enters input sometimes not, just hit keyboard)? santa19992000@yahoo.com C Programming 4 09-09-2005 03:38 AM
Getting user input to go to Access Database JT ASP .Net 7 02-10-2005 01:54 AM



Advertisments