Hi,

You're supplying the parameters as a string, which means *you're*
taking responsibility for URL-encoding them correctly[1] -- but you're
not. I suggest letting Prototype handle the encoding, by supplying
your parameters as an object:

    parameters: {name: $F('name')},

[1] http://prototypejs.org/api/ajax/options

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


On Dec 23, 4:49 pm, César <[email protected]> wrote:
> Hi I need some help:
>
> When you enter a character (?) As parameter returns me empty. I put
> this example:
>
> In a text box with id = "name" entry = "Hi" and through this function:
>
> function sendRequest() {
> new Ajax.Request("contact.php",
> {
> method: 'post',
> parameters: 'name='+$F('name'),
> onCreate : function startLoading() {
>                 $('respuesta').innerHTML= '<img src="images/sending.gif"
> width="16" height="16" align="absmiddle">';
>                         Form.Element.disable("Envia");
>                         },
> onComplete: function showResponse(req){
>                         $('respuesta').innerHTML= req.responseText;
>                         Form.Element.enable("Envia");
>                                 if(req.responseText == "success") {
>                                         $('mensaje_contacto').innerHTML= 
> 'success';
>                                 }
>                         }
>
> });
> }
>
> I return "Hi" satisfactorily. But if I enter "Hi?" I returned empty.
> It seems that if I enter (?) Occurs an error in the parameter section.
> How can I solve this?. I hope your help. Thank you very much.

--

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


Reply via email to