Prev | Current Page 59 | Next

Larry Ullman

"Building a Web Site with Ajax: Visual QuickProject Guide"


4 Save the fi le (it will continue to use the name add_employee.html).
??¦
Add an Employee



??¦
??¦

Use this form to add an employee (all fields are
required):



form???>
??¦
62 adding records via Ajax
apply the Ajax layer
1 The fi rst line tells the Web browser to run the init() function after
loading the entire page. The init() function sets up all the Ajax activity.
2 The function calls the getXMLHttpRequestObject()
function
to get a valid, browser-specifi c
object. This function is defi ned in
ajax.js, which will have already
been included by the HTML page.
3 The function then checks to
see if the ajax variable has a valid
value. With supported browsers,
ajax will be an XMLHttpRequest
object. With nonsupported browsers,
ajax will have a value of
false, and this conditional will
be false.


Pages:
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71