$.ajax({
type: "GET",
url: "phpFiles/cslogin.php",
data: { staff_id: csID, password: pwd },
datatype :"json" <-----------------
}).done(function( data ) {
var obj = JSON.parse(data);
if (obj==null) {
alert("wrong ID or password.");
}else{
localStorage.setItem('user', data);
alert("Welcome "+obj.staffName+" .");
window.location.href = "customerMain.html";
}
});
for tis method can i change the DATATYPE TO BOOLEAN ,STRING OR INTEGER?
and can some1 tel...i already state the json for the datatype ..how come i still nid to do casting
jquery ajax