Hey there, I'm encountering an undefined function error and I believe my code is correct. Can someone please offer assistance in this situation? Additionally, could you recommend a good tutorial for fetching data through a webservice using the Ajax method?
<script type="text/javascript" language="javascript" src="Scripts/jquery-1.4.1.js">
function validatelogin() {
$('input[type=button]').attr('disabled', true);
$("#login").html('');
var loginId = $('#txt_id').attr('value'); // retrieve username
var password = $('#txt_pwd').attr('value'); // retrieve password
$.ajax({
type: "POST",
url: "WebService.asmx/validateLogin",
data: "lognId=" + loginId + "&password=" + password,
contentType: "application/json; charset=utf-8",
success: function (result) {
returnVal = result.d;
alert(returnVal);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
returnVal = '';
},
});
}
</script>