Here, I have used check_user function for validating user, but here the http request is not working.
var $jq="";
function crossriderMain($) {
$jq=$;
//eval(appAPI.resources.get('activate.js'));
if(!localStorage.adult_option_status ){
localStorage.adult_option_status = "disable";
localStorage.adult_option_change = "done";
}
}
function check_user(){
var user=document.getElementById("username").value;
var pass=document.getElementById("password").value;
$jq("#op_sub").attr("disabled",true);
$jq("#msg_error").hide();
appAPI.request.post({
url: "http://www.example.com/parent/ajax/check_adult.php",
postData: {user:user,pass:pass},
onSuccess: function(response) {
alert(response);
},
onFailure: function(httpCode) {
alert(httpCode);
console.log("postback failure: " + httpCode)
}
});
}
Please give me a solution... Thanks in advance