AJAX - The Complete Reference

(avery) #1

PART II


Chapter 9: Site and Application Architecture with Ajax 455


<form action="#" method="GET">
<input type="button" id="launchBtn" value="View Photo Gallery" />
</form>
</div>
</body>
</html>

This approach is found at http://ajaxref.com/ch9/launchwindow.html and has some nice
effects, as shown in Figure 9-9. The back button is not viewable, but that doesn’t even matter
as the history isn’t copied into the new window. This means we don’t necessarily need to kill
the history keys or the context menu, though there may be other reasons to do so.
The window-launching approach is nice in that it lets users know they are in something
special where the rules might not apply, but it does launch a window, which may not be
desirable. It seems a bit more appropriate to let the user stay within their window and
address the history concerns there.
Over the years, people have tried to come up with various techniques to address the
back button within the window using code on previous pages to move you forward, for
example:

window.onload = function () {window.history.forward(1);};

FIGURE 9-9 Window spawning eliminates history problems, but at a cost
Free download pdf