Database Reference
In-Depth Information
A code sample of using jQuery (from the jQuery API page at http://api
.jquery.com/jQuery.getJSON/ ) is included here:
<html>
<head>
<style>img{ height: 100px; float: left; }</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div id="images">
</div>
<script>
$.getJSON("http://api.flickr.com/services/feeds/
photos_public.gne?jsoncallback=?",
{
tags: "mount rainier",
tagmode: "any",
format: "json"
},
function(data) {
$.each(data.items, function(i,item){
$("<img/>").attr("src", item.media.m).appendTo("#images");
if ( i == 3 ) return false;
});
});</script>
</body>
</html>
The getJSON function takes three parameters: The first parameter is the URL
to be accessed, the second parameter is the list of parameters to be passed
to the URL, and the third parameter is the function that will process the data
when it is received.
InSTAllIng THe HTMl5 SAMPleS
Running most of the HTML5 samples is as easy as double-clicking the .HTML
file and accepting the security warning. However, when working with web
service calls, for security reasons the JavaScript calling the web service and
the web service itself should be on the same website.
All the samples are available in the download iles for this topic at www.wiley
.com/go/visualintelligence .
Start by opening IIS from Administrative tools a IIS Manager in the Windows
menu.
Search WWH ::




Custom Search