O'Reilly logo

JavaScript® and AJAX for Dummies® by Andy Harris

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 14. Working with AJAX Data

In This Chapter

  • Understanding the advantages of server-side programming

  • Getting to know PHP

  • Writing a form for standard PHP processing

  • Building virtual forms with AJAX

  • Submitting interactive AJAX requests

  • Working with XML data

  • Responding to JSON data

AJAX and jQuery are incredibly useful, but perhaps the most important use of AJAX is to serve as a conduit between the Web page and programs written on the server. In this chapter, you get an overview of how programming works on the Web server. First you look at traditional server-side programs, and then I explain how AJAX changes the equation. You find out the main forms of data sent from the server and how to interpret this data with jQuery and JavaScript.

Getting an Overview of Server-Side Programming

The JavaScript programming you do throughout this book primarily works on the Web browser — the client. However, all Web programming also has a relationship with the machine that hosts Web pages — the server. In the examples so far, the Web page is retrieved from the server, and then the JavaScript programs inside the page are executed by the client machine. This is a very powerful approach, but it does have limitations. Most importantly, client-side code cannot store data or access external programs for security reasons.

Fortunately, there's a solution. You can also write programs that reside on the Web server. They work a little differently than client-side programs. A server-side program runs on the Web server, ...

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