I encountered an unexpected error when trying to execute the loginConnect.onload function.
While following a tutorial from an older source located at , this issue arose.
Any assistance on resolving this would be greatly appreciated. Thank you!
var loginConnect = Titanium.Network.createHTTPClient();
function gridWindow(e){
if($.username.value != ""&&$.password.value != ""){
loginConnect.open("POST","http://localhost:80/grid/indexgrid.php");
var params = {
username: $.username.value,
password: Ti.Utils.md5HexDigest($.password.value)
};
loginConnect.send(params);
} else{
alert('All fields are required');
}
};
loginConnect.onload = function()
{
var json = this.responseText;
var response = JSON.parse(json);
if (response.logged == true)
{
alert("Welcome back");
} else {
alert('not working');
}
};
$.index.open();