I needed to validate textbox value from database using ajax call.
i have inluded below in jsp file
i have below code in .js file
i am keep getting firebug error "$.ajax is not a function"
can someone please help me what is right way to do this?
thanks
i have inluded below in jsp file
Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
Code:
function validateOtherDiagCodeFromSP_WOTHERICD(num){
alert("kinjal "+num);
var otherDiagCode = document.forms['content:ProviderSubmitClaims'].elements['content:ProviderSubmitClaims:itxEIFOtherDiagCode'+num].value;
otherDiagCode = trimAll(otherDiagCode).toUpperCase().replace(/[^a-zA-Z0-9]/g,''); //it will convert to uppercase plus replace all characters except numbers and letters
alert(otherDiagCode);
CallPageMethod("validateOtherDiagCode", success, fail,otherDiagCode);
$.ajax({
url: "/nva/application/claims/provider/dao/ProSubmitClaimsDAO/validateOtherDiagCode",
type: "GET",
data: otherDiagCode,
dataType: 'json',
success: function(response){
alert("response: "+response);
},
error: function(e){
//handle error
}
});
}
can someone please help me what is right way to do this?
thanks
Comment