Forum: Rails Spinoffs (closed, excessive spam) Extra empty _ param in ajax.request

6610bb520369abb55042774680545ef8?d=identicon&s=25 Billy Gray (Guest)
on 2008-07-11 22:04
(Received via mailing list)
Folks,

While working on an instance of Ajax.Autocompleter that will bounce
off of a stored procedure via Oracle's mod_plsql (don't ask, it's been
a long strange journey), I ran into one final hiccup that I can't
quite fathom, although the workaround is pretty obvious.

When you hit a stored procedure in mod_plsql, if the parameters in the
query string don't match the procedure definition, you'll get a 404
error.  And I was getting a 404 error, despite the fact that I got
exactly what I wanted if I directly accessed the URL.

I took a look in Firebug and it turns out that prototype's
Ajax.request method was attaching an extra parameter named '_' with no
value.

This little bit was doing it:

  request: function(url) {
    var parameters = this.options.parameters || '';
    if (parameters.length > 0) parameters += '&_=';

I did try adding a useless extra param to my stored procedure def, but
you can't name an IN parameter with underscore and nothing else!

So, I just commented out that little bit there, and it works fine now.

So what is the &_= for?  I'm sure it's pretty harmless in most
situations, but there doesn't seem to be a way to turn off the
behavior when it does cause trouble.

Cheers!
Billy
Ca3e484c121268e4c8302616b2395eb9?d=identicon&s=25 T.J. Crowder (Guest)
on 2008-07-11 22:14
(Received via mailing list)
Hi,

We've started transitioning to a new, better-named, hopefully-spam-
free group for Prototype and script.aculo.us:

   http://groups.google.com/group/prototype-scriptaculous/

   prototype-scriptaculous@googlegroups.com

Could you please post your question there instead?  Thanks!  People
might still answer here, but probably not for all that much longer...
--
T.J. Crowder
tj / crowder software / com
This topic is locked and can not be replied to.