getElementsByTagName(???select???));
return args;
}
The entire code for iui.js is provided in Listing 3 - 4 .
Listing 3 - 4: iui.js
(function() {
var slideSpeed = 20;
var slideInterval = 0;
var currentPage = null;
var currentDialog = null;
var currentWidth = 0;
var currentHash = location.hash;
var hashPrefix = ???#_???;
var pageHistory = [];
var newPageCount = 0;
var checkTimer;
//
***********************************************************************************
**************
(continued)
Chapter 3: Implementing the Interface
76
Listing 3 - 4 (continued)
window.iui =
{
showPage: function(page, backwards)
{
if (page)
{
if (currentDialog)
{
currentDialog.removeAttribute(???selected???);
currentDialog = null;
}
if (hasClass(page, ???dialog???))
showDialog(page);
else
{
var fromPage = currentPage;
currentPage = page;
if (fromPage)
setTimeout(slidePages, 0, fromPage, page, backwards);
else
updatePage(page, fromPage);
}
}
},
showPageById: function(pageId)
{
var page = $(pageId);
if (page)
{
var index = pageHistory.indexOf(pageId);
var backwards = index != -1;
if (backwards)
pageHistory.splice(index, pageHistory.length);
iui.showPage(page, backwards);
}
},
showPageByHref: function(href, args, method, replace, cb)
{
var req = new XMLHttpRequest();
req.
Pages:
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104