I am new to web development and this is my first attempt at using JSON. On the JSON website (http://www.json.org/JSONRequest.html), they recommend using JSONRequest.get for certain tasks. However, I keep running into an error stating "JSONRequest is not defined". Here is a look at the code I have been working on:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta Content-Type= application/jsonrequest >
<title>Insert Events Page</title>
</head>
<body>
<h2>List of ALL events: </h2><br>
<script type="text/javascript">
try {
JSONRequest.get("http://localhost:8888/mma/event/allevents", function(sn, response, exception){
alert(exception || response);
});
}
catch(e) {
alert(e);
}
</script>
</body>
</html>