Let's take a look at how this handles by viewing the example:

View Basic Example

As you can see the function does what it intends to do, but it doesn't really highlight the versatility of XMLHttpRequest. Let's go with a few different examples to demonstrate.

In this next example, we change the start_up case to the following which indicates to the browser that we want navigation.xml loaded through the XMLHttpRequest object.

case "start_up":
ajaxManager('load_page', 'navigation.xml', 'contentLYR');
break;