item(0);
var text = root.getElementsByTagName('text').item(0);
// prepare the XHTML
var updateValue = '
'
+ name.firstChild.nodeValue + '
'
+ text.firstChild.nodeValue + '
';
APIs and Web Services
[ 290 ]
// update the page element 'update'
$('update').empty().setHTML(updateValue);
}});
Now when we use the form, the update element content will be updated with an
XHTML interpretation of the XML retrieved by the AJAX request. This screenshot
depicts the resultant updated page with some CSS applied:
When we encounter difficulties creating JavaScript, it can be useful to use a
JavaScript debugger. An example of such a debugger is the freely available Firebug,
a utility for Firefox that provides us with a number of useful tools (http://www.
getfirebug.com):
LDAP
LDAP (Lightweight Directory Application Protocol) is often associated with user
authentication. While it is true that LDAP is used extensively for authentication,
directory applications can be used for far more.
Pages:
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399