On Aug 24, 2007, at 10:19 AM, [EMAIL PROTECTED] wrote:
>> From your description, it sounds like you're building your query
>> string by hand ... and not properly URL-encoding the '#' character.
>> (Recall '#' is used for page anchors.) Newer version of Prototype
>> allow you to pass a Hash/Object in to the request's parameters
>> option. Doing it that way would save you from having to do the
>> encoding yourself.
>>
>> TAG
>
> you don't understand to me. I didn't want to pass a hash. I only
> wanted to pass the string with '#' character on it like i did with the
> other version, because i use that for a special encoding for my
> database.
>
> i don't find the solution, but i changed '#' character for '@'
> character and it works (and if it works... don't touch it!! ^_^). Now
> i can to pass strings encoded strings with special characters like
> 'ñ', marked vowels or '¡' using '@' character for to encode (only i
> hope this fix will work in any other case ;) )
It sound like you're still not quite understanding how Prototype can
solve your problem (and that parameters passed as a query string need
to be URI encoded). The following statements are functionally
equivalent:
var value = 'bit#baz';
new Ajax.Request(url, {
parameters: {foo: value}
});
new Ajax.Request(url, {
parameters: 'foo=' encodeURIComponent(value)
});
http://prototypejs.org/api/ajax/options
TAG
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---