Hi again,
Yes, you are using the post method, but are not passing the parameters
in the post body.
Try using...
var myURL = 'includes/locRef.rbf';
var params = 'p='+postLocComment+'&postid=' + postID + '&userid=' +
userID + '&comment=' + myComment;
new Ajax.Updater(
'',
myURL,
{method:'post',parameters:params}
);
encodeURIComponent() is a native JavaScript command to URL-encode
strings so they can be passed in a URL.
It's not necessary to use it for strings in the post body, but I just
got used to always encode al string before sending them to the server.
For further information about Ajax requests with prototype have a look
at http://prototypejs.org/learn/introduction-to-ajax
Miguel
BeeRich wrote:
> I am using a post method:
>
> new Ajax.Updater(
> '',
> myURL,
> {method:'post'}
> );
>
> I'm not sure what you mean by encodeURIComponent(). Any links?
>
> Cheers
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---