I have the following code that makes a request to a WS by jquery:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Calling Web Service from jQuery</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript">
function CallWebService(){
$.ajax({
type: "POST",
url: "urldelWS",
dataType: "json",
contentType: 'application/json; charset=utf-8',
data: "{parámetros de la petición}",
cache: false,
async: false,
success: function (data){},
error: function (data){}
});
}
</script>
</head>
<body>
<h3>
Calling Web Services with jQuery/AJAX
</h3>
<input type="submit" onclick="CallWebService()" value="Call web service" />
</body>
</html>
My problem is that when I press the button, the browser shows me the following error:
SCRIPT5009: '$' is undefined
Some idea of where the error is.