From: J-H Johansen Date: 2007-06-28T16:00:04+09:00 Subject: Re: Ajax with Ruby problem On 6/28/07, Gale CC wrote: > I'm pretty sure the shebang line is correct. I verified by doing "which > ruby" and also ran the file independently from the shell by typing > "./test2.rb" and it works. > > Also the file runs fine when its set as an "action" to a form, but not > in this case when its run from inside a javascript script. Any idea > what's wrong ? Download the "web developer" plug-in for Firefox and enable while you're developing. It's a nice feature to see each and every call you make and you can even inspect the output from the calls. The reference you're using here looks a bit weird though. xmlHttp.open("GET","test2.rb",true); Normally, I would have to reference the cgi-bin directory as well, and this here appears to reference the Ruby script as though it was located in the same directory as the HTML file that produces the page. Try something like this: xmlHttp.open("GET","/cgi-bin/test2.rb",true); if the script is located at the root of the cgi-bin directory. -- J-H Johansen -- There are 10 kinds of people in the world: Those who understand binary and those who don't...