Sorry, my message got sent prematurely.

Example of #1:

new Ajax.Request(thisCGI, {
        method:'post',
        parameters: field +'='+ encodeURIComponent(value),
        onSuccess: function(ok)  {   },
        onFailure: function(err) {  }
});

Example of #2:

new Ajax.Request(thisCGI, {
        method:'post',
        parameters: {name: value},
        onSuccess: function(ok)  {   },
        onFailure: function(err) {  }
});

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Apr 18, 11:02 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi,
>
> I'm surprised `escape` isn't working, but you probably didn't want to
> be using it anyway. Two things you might try:
>
> 1. Using `encodeURIComponent`. It's specifically designed to handle
> encoding things into URIs.
>
> 2. Using an object rather than a string, and letting Prototype handle
> it for you.
>
> On Apr 18, 9:40 pm, Riccardo Perotti <pero...@pobox.com> wrote:
>
>
>
>
>
> > I keep getting a "URIError: URI error" from prototype when using latin
> > accents and 'Ñ' in Ajax.Request() even if I escape() the value!
>
> > The simplified example below works with value = "Maria" but fails ()
> > with value="María" or value="Niño" (note the value is escape()'d) .
> > ANY IDEAS?
>
> > var thisCGI = 'path/to/my/cgiscript/';
> > var field = 'name';
> > var value = 'María';
>
> > Ajax.Request(thisCGI, {
> >         method:'post',
> >         parameters: field +'='+ escape(value),
> >         onSuccess: function(ok)  {   },
> >         onFailure: function(err) {  }
>
> > });
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Prototype & script.aculo.us" group.
> > To post to this group, send email to 
> > prototype-scriptacul...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > prototype-scriptaculous+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/prototype-scriptaculous?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to