CHAPTER 6 DECOUPLED NAVIGATION PATTERN The a (Disney web site)

CHAPTER 6 DECOUPLED NAVIGATION PATTERN The a HTML element has an href attribute, which indicates the destination URL that the web browser will navigate to. Clicking on a link results in whatever content you have loaded being replaced with the content that the URL http://www.apress.comcontains. With respect to writing Ajax applications, these types of links are dangerous because they will replace the current content that has a state with brand new content that has no state. Pressing a Back button does not reload the old state, but loads a new state. The described simple link is akin to killing an application and then starting a new application. One way to save the content and state is to use the State Navigation pattern, which saves the state of the content before loading the new content. Another way of getting around the content deletion problem is to redirect the content to another window, as illustrated by the following link example: External Link The additional attribute target references an identifier that represents another window identifier. If the window identifier does not exist, a brand new window is opened and the content is loaded into that separate window. If the content needs to be loaded locally, a frame is used. Following is an example that uses a floating frame: External Link

A floating frame is a document within a document. Figure 6-8 shows an example. E B V N Figure 6-8. A floating frame, or document within a document Using a frame creates a document-within-a-document architecture and has been a way for web application developers to mimic the XMLHttpRequest object behavior. The following example mimics the XMLHttpRequest object behavior by using a floating iframe with a pixel size of 1 by 1 in a small corner to the side of the document:
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Leave a Reply