I am attempting to submit a querystring to a ColdFusion page. I would like the ColdFusion page to return true or false based on whether the login in successful.
When my login button is clicked:
function AttemptLogin(userName, password)
{
$.ajax({
url: 'login.cfc&user=' + userName + '&' + 'password=' + password,
success: function(data) {
$('.result').val();
[Check for true or false here.]
}
});
};
My ColdFusion page authenticates the password and user name, and returns, but I don't know how to process what it's returning? I am very new to ColdFusion.
<cffunction "TryLogin" returntype="boolean">
</cffunction>
..I'm not sure how to return data from the function after it authenticates, yet alone read it once it returns. Anyone dealt with this before?
Thanks, George