Prev | Current Page 282 | Next

Frank Zammetti

"Practical DWR 2 Projects"

In this case, we then need to get the innerHTML values of the
three cells in the row, which we do by way of an array reference to the array of cells that the
parent element has.
CHAPTER 4 n INSTAMAIL: AN AJAX-BASED WEBMAIL CLIENT 149
Notice too that the contact name is not editable, and we therefore need to disable it. The
contact name is, in a sense, the unique key, if this were a database table. Therefore, we do not
want the user to be able to change that key, and hence the field is not editable.
Next up is gotoComposeMessage(). The only complication here is that if we are in the
Address Book view, we assume that the user has selected a contact and wants to compose a
message to that person. In that case, we grab the e-mail address and populate the address
field on the Compose view. Note that the showing and hiding of the Please Wait
is pretty
much superfluous since the view switch is basically instantaneous. I only do it for the sake of
consistency, since anywhere else the view changes, the Please Wait
is shown. The message
composition screen, which incidentally is almost the same as the screen for composing a
reply, can be seen in Figure 4-6.
Figure 4-6.


Pages:
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294