0

I have this function getResult()

<script>
function getResult()
{
dataString = "un="+user+"&pw="+password+"&cid="+cid;
$.ajax({
    type: "POST",
    url: "http://myexamplesite.com",
    data: dataString,
    crossDomain: true,
    cache: false,
    success: function(result){
        alert(result);
    },
    error: function(result){
        alert(result);
    }
});
}
</script>

when i call the function, i am getting the value in background what i want, means this gives me success output but this function always call error function on success call back I am not sure and even not found what is wrong with this script. Thanks in advance.

Kirankumar Dafda
  • 2,354
  • 5
  • 29
  • 56

0 Answers0