HTML widgets
The JSONP output allows you to retrieve data from the API using simple JavaScript on a static web page. Here is a complete example;
<!DOCTYPE html>
<html>
<head>
<title>Widget demo</title>
</head>
<body>
<h1>JSONP in action</h1>
<div id="job"></div>
<script>
function foo(o) {
var div = document.getElementById("job");
if (o.results.length > 0) {
div.appendChild(document.createTextNode(o.results[0].title));
div.appendChild(document.createElement("p"));
div.appendChild(document.createTextNode(o.results[0].description));
}
else {
div.appendChild(document.createTextNode("no jobs available :-("));
}
return;
}
</script>
<script src="http://api.adzuna.com/v1/api/jobs/de/search?callback=foo&what=sales" type="text/javascript"></script>
</body>
</html>