Summary

In this chapter we created a weather widget that can be placed on any page. We made Ajax requests to get static XML and JSON data from the server. We learned how to find the user's location using the Geolocation API, and used that to call a web service to get localized weather data.

We covered the following concepts in this chapter:

  • How to read XML and JSON files from the server using Ajax
  • How to extract data from XML returned from server calls using jQuery
  • How to get the user's current position anywhere in the world using the HTML5 Geolocation API
  • How to interact with web services asynchronously using Ajax
  • Using JSONP to get around the security restrictions of cross site scripting
  • How to get the weather report for a user's current location using ...

Get HTML5 Web Application Development By Example Beginner's guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.