O'Reilly logo

jQuery, jQuery UI, and jQuery Mobile: Recipes and Examples by Adriaan de Jonge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Communicating with the Server

This chapter discusses how to communicate with the server. To demonstrate this, a simple test server is written in Node.js, which is a server-side JavaScript execution environment. After that, various recipes show how to get JSON, HTML, XML, and JSONP from the server by using AJAX methods and functions. This chapter pays a lot of attention to error handling to assure the quality of the end result.

Recipe: Setting Up an Example Server in Node.js

To test the AJAX examples, you need a server. For the examples, it does not matter whether the server is written in PHP, Python, Ruby, Erlang, Dart, Go, .Net, or Java. Keep in mind, of course, that all servers take some setup time.

Because jQuery is JavaScript, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required