currentView = "divIntro";
showView(currentView);
<%
OptionsDTO options = new OptionsManager().retrieveOptions(
pageContext.getServletContext());
// The application has not yet been configured, so we want to
if (options.isConfigured()) {
%>
// The buttons start out not showing, to avoid Javascript errors
// if you hover over them before the page fully loads, but now
// we can show them.
setClassName("topButtons", "divShowing");
setClassName("sideButtons", "divShowing");
appConfigured = true;
<%
} else {
%>
// The application has not yet been configured. In this case,
// the buttons ARE NOT shown, and instead we show the normally
// hidden "Getting Started" div.
setClassName("divGettingStarted", "divShowing");
appConfigured = false;
<%
}
%>
}
CHAPTER 4 n INSTAMAIL: AN AJAX-BASED WEBMAIL CLIENT 139
As its name and comments imply, this function is called when the page loads to initialize
InstaMail. In a bit we??™ll look at script.js, which contains the balance of the client-side code
for InstaMail. I mention that because you may wonder why this script is in index.jsp as
opposed to script.js with everything else. The reason is the scriptlet section at the end.
Pages:
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274