164 CHAPTER 6 (Web hosting mysql) DECOUPLED NAVIGATION PATTERN Document
164 CHAPTER 6 DECOUPLED NAVIGATION PATTERN
External Link In the example HTML, the iframe has an attribute, onload, that represents an event that is triggered when the document within iframe has been loaded. In the example, the function LoadedContent is called, which will generate a pop-up box displaying the URL of the loaded document. What is of special interest is the frame.contentWindow.location.href reference, which crosses domain boundaries. Remember from Chapter 2 there was an explanation of the same origin policy. The property frame.contentWindowis considered one domain, and location.href is considered another domain. If both domains fall under the same origin policy, the window. E B V N alert pop-up box can execute. If, however, both domains do not fall under the same origin policy, a permission exception is generated. The property reference location.href causes the permission exception. It is possible to load content that violates the same origin policy, but it is not possible to manipulate that content, nor is it possible for the loaded content to manipulate the caller.1 What has not been illustrated, but is possible, is to load content into a frame that is then used to manipulate content in the caller. In that situation, the frame behaves like the Content Chunking pattern as the frame provides a chunk of content that is injected. Event Bubbling HTML events can be associated with any HTML element. The HTML event can be triggered in two ways: the HTML element triggers the event, or the HTML element contains another element that triggers the event. HTML has a unique characteristic in that events can pass up a hierarchy of elements in a process called event bubbling. In event bubbling, an HTML element triggers an event that is sent from one HTML element to another HTML element. The idea is to pass the HTML event from the child to the parent, and to continue that event-chaining process until the last parent is called. Typically, the last parent to process a bubbling HTML event is the HTML document. Consider the following HTML, which illustrates event bubbling: 1. At the time of this writing, there exists a hack that makes it possible to load a script that violates the same origin policy. The technique is considered a hack because it is a loophole that most likely will be closed at some later point and is a security issue.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.