[[PageOutline]] This page is one of the !MapGuide Community CodeSamples. Visit the CodeSamples page to view more! == Hooking to events in the AJAX viewer == The AJAX viewer in its current form is quite limited in terms of customizability. It would be nice if you could listen to capture certain events in the ajax viewer and add on your custom javascript. This page will show how to do the following: * Checking when the map has been loaded. * Handling viewer selection. It is assumed you know what anonymous functions are and how they work. == Checking when the map has been loaded == Before we can hook on to events in the ajax viewer, we need to check that the DOM for the ajax viewer has been loaded. This sample shows how to do it. Assume your viewer page looks something as follows: {{{ #!text/html