Billy Gray
unread,Jul 11, 2008, 5:02:28 PM7/11/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prototype & script.aculo.us
(I posted this to spinoffs earlier today, but TJ suggested I re-post
here, since this is the new place to hang ;-)
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