how to generate error on xui.Ajax callback

Develop and Deploy Native Apps for Windows, OS X, Linux, Unix ...
Post Reply
tomy300
Posts: 70
Joined: Sat Nov 09, 2013 12:27 am

how to generate error on xui.Ajax callback

Post by tomy300 »

Hi,

how to generate error on xui.ajax callback via php

on ajax jquery we use, to throw an error.
<?
header('HTTP/1.1 500 Internal Server Error');
?>

but this does't seem to work. ?? any idea?

support
Posts: 356
Joined: Sat Apr 27, 2013 9:22 am

Re: how to generate error on xui.Ajax callback

Post by support »

In onFail fuction, you can get error message "Error: XMLHTTP returns--500".
javascript code
xui.Ajax("test.php", "", function(){
    console.log("OK",arguments);
}, function(){
    console.log("KO",arguments);
}).start();

tomy300
Posts: 70
Joined: Sat Nov 09, 2013 12:27 am

Re: how to generate error on xui.Ajax callback

Post by tomy300 »

thanks it's work

Post Reply