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
'success'...
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
Thomas

new Ajax.Request('php/ajaxCalls/registrationSave.php',
  {
    method:'POST',
    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 
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