Google Groups Home
Help | Sign in
Extra empty _ param in ajax.request
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Billy Gray  
View profile  
 More options Jul 11 2008, 5:02 pm
From: Billy Gray <billy.zop...@gmail.com>
Date: Fri, 11 Jul 2008 14:02:28 -0700 (PDT)
Local: Fri, Jul 11 2008 5:02 pm
Subject: Extra empty _ param in ajax.request
(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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kangax  
View profile  
 More options Jul 11 2008, 5:43 pm
From: kangax <kan...@gmail.com>
Date: Fri, 11 Jul 2008 14:43:28 -0700 (PDT)
Local: Fri, Jul 11 2008 5:43 pm
Subject: Re: Extra empty _ param in ajax.request
Appending that underscore fixes an (empty XHR postBody) issue in
Safari 2.x
It may no longer be an issue.

-- kangax

On Jul 11, 5:02 pm, Billy Gray <billy.zop...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Billy Gray  
View profile  
 More options Jul 14 2008, 10:13 am
From: Billy Gray <billy.zop...@gmail.com>
Date: Mon, 14 Jul 2008 07:13:22 -0700 (PDT)
Local: Mon, Jul 14 2008 10:13 am
Subject: Re: Extra empty _ param in ajax.request
Ah, that explains it.  Well, at least it's out there for posterity
then.

Thanks for the info, kangax!

B

On Jul 11, 5:43 pm, kangax <kan...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google