Hi there,
I am doing an ajax request with prototype.js.
The corresponding php - file does an " echo 'success'; " when
everything is fine.
Now I want to check with javascript if the responseText equals
'success' and then go on with other functions...
But the comparison does not become true, even when php echos
When forwarding the responseText to a new location, it becomes '%EF%BB
%BFsuccess' in the url
This is the utf-8 BOM, isnĀ“t it? Do I have to remove it before being
able to compare the responseText?
HOW? Thanks and kind regards

new Ajax.Request('php/ajaxCalls/registrationSave.php',
    parameters: params,
    onSuccess: function(transport){

     var response = transport.responseText;
     if (response == 'success')
          //do somethint

    onFailure: function(){ alert('failure') }

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-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to