If you pass it to params as a Hash, you shouldn't have a problem.
e.g. {"name":"value"}

If you're passing it as a string, you may want to encodeURIComponent 
() on the value portion first.


TAG

On Jul 1, 2007, at 1:31 AM, BeeRich wrote:

>
> Hi folks.
>
> I have a form submission that might take a question mark as part of a
> field.  Of course, setting the params variable for an ajax.request
> will essentially screw it up due to the second question mark in the
> params string.
>
> So I went to regexp and made this function:
>
> function cleanQuestion(str) {
>       /*              Returns a string with question marks as $#63;           
> */
>       var myReturn = str.replace(/^\?/, '?');
>       return myReturn;
>
>       }
>
> The problem is, it still shows up as a question mark.
>
> Anybody know how to get around this?
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to