Autodesk 15606-011408-9300 Developer Guide - Page 71
Browser Differences, Event Observer Set Methods
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 71 highlights
Browser Differences The following table summarizes the basic differences between how Netscape Navigator and Internet Explorer handle events: Netscape Navigator Internet Explorer For Netscape Navigator, Autodesk MapGuide provides an observer applet that you embed in your application using the tag. For Autodesk MapGuide Viewer Plug-In, this applet is called: MapGuideObserver6.class For Autodesk MapGuide Viewer, Java Edition, it is called: MapGuideObserver6J.class You can use the same instance of the observer applet for all events. For Internet Explorer, you write a few lines of VBScript code that tell Internet Explorer the name of the event handler. You must create a separate event handler for each type of event you want to handle. To call an Autodesk MapGuide method that triggers an event, you pass the Autodesk MapGuide observer as a parameter. Internet Explorer knows how to find the event handler without being passed its name because it assumes the event handler name will match the event it is handling. Event Observer Set Methods There are some MGMap methods whose sole function is to allow you to set an observer for a specific event. For example, when the map view changes (for example, in response to a user panning or zooming), you can set the observer for the onViewChanged by creating a function called onLoad (a browser event) and inserting the MGMap.setViewChangedObserver method to set the observer for the onViewChanged event. You can do this for each of the events you want to handle. Note that specifying an observer is not required for all events-just for the events you want to handle. Working with Event Handlers | 71