Datasheet

Chapter 1: AJAX Technologies
10
Listing 1-2 (continued)
</tr>
<tr style=”background-color: PaleGoldenrod”>
<td style=”font-weight: bold”>
Last Name</td>
<td>
<span id=”lastname” />
</td>
</tr>
<tr>
<td style=”font-weight: bold”>
Employee ID</td>
<td>
<span id=”employeeid” />
</td>
</tr>
<tr style=”background-color: PaleGoldenrod”>
<td style=”font-weight: bold”>
Department
</td>
<td>
<span id=”departmentname” />
</td>
</tr>
</table>
</form>
</body>
</html>
Figure 1-3
Figure 1-4
Note that Listing 1-2 registers a JavaScript function named
submitCallback as an event handler for the
click event of the button. This function encapsulates the logic that schedules and makes the asynchronous
request to the server. This logic is what is referred to as the Scheduler in Figure 1-2 .
c01.indd 10c01.indd 10 8/20/07 5:40:06 PM8/20/07 5:40:06 PM