From: Phlip Date: 2007-07-15T13:11:27+09:00 Subject: Re: Passing arguments to ruby script Gale CC wrote: > If I do something like: > xmlHttp.open("GET","ajaxhandler.rb" + myargument,true) > then the script fails. > > The PHP way to handle such cases is to add "?argument=argumentvalue" > after the file name. And then within the PHP script you can further > parse the values. > > Is there anything similar in Ruby ? Or is there any other fix to this > problem ? Briefly: Use Ruby on Rails. It hides all this wiring and patching behind a slick interface, so you can spend time on your actual features. Without RoR, your question here is the moral equivalent of an Assembler question on a C newsgroup. Don't re-invent the wheel. If you simply cannot, then raid its JS library, prototype.js, for high-level wrappers. There's simply no reason to call xmlHttp yourself, when libraries like prototype.js have taken care of all the hairy asynchronicity and networking issues for you. -- Phlip http://www.oreilly.com/catalog/9780596510657/ "Test Driven Ajax (on Rails)" assert_xpath, assert_javascript, & assert_ajax