Thanks, this is a big help, my question is about the java script code: <!-- Javascript part --> <script type="text/javascript"> var mapFrame = null; // A reference to the map frame var originalMapFrameOnSelectionChanged = null // storage for the original onSelectionChanged function function OnSelectionChanged() // when something is selected on the map { alert('Your handler works perfectly'); originalMapFrameOnSelectionChanged(); }
function InitDocument() { var win = document.getElementById('viewerFrame'); if (win.contentWindow) //FF returns the actual tag, IE returns the iframe win = win.contentWindow; mapFrameRef = win.GetMapFrame(); originalMapFrameOnSelectionChanged = mapFrameRef.parent.OnSelectionChanged; mapFrameRef.parent.OnSelectionChanged = OnSelectionChanged; } function RetryInit() { if (mapFrame != null) return; try { InitDocument(); //At this point, you can post a "PageLoaded" via a form or AJAX } catch (e) { mapFrame = null; } if (originalMapFrameOnSelectionChanged == null) { mapFrame = null; window.setTimeout("RetryInit();", 500); } </script> What does it actually do? I know this is not a java script tutoral, was wondering how this intergrates with mapGuide. Could I just call a C# function so I may use the MG API to manipulate the map? Regards, Nick Aizen
_______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users