Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A simple way to use Ajax is to store (or generate) data on the server as HTML fragments that can be added into a page. An HTML fragment, as its name suggests, is a term I use for an HTML file (or HTML that is generated by the middleware on your server) that is not a complete page but simply some HTML elements that are intended to be added to an existing page—they can’t really “stand alone.” I’ll demonstrate using HTML fragments in a multipage catalog example.
In this example, I’ll create a simple catalog that has an index page and three product pages. I’ll again use my beloved guitars for content, as Figure 5.7 illustrates.