I visited the link you sent Jackie and used it in my code but still my app doesn't work... I send here a little snippet of my code:
var map = parent.parent.mapFrame; var origOnSelectionChanged = null; function MySelectionHandler() { origOnSelectionChanged(); var selCount = map.GetSelectedCount(); if(selCount > 0) { My function() {} } } window.onload = function() { var timer; var watch = function() { try { if(map.mapInit) { clearInterval(timer); origOnSelectionChanged = map.OnSelectionChanged; map.OnSelectionChanged = MySelectionHandler; } } catch(e) { } }; timer = setInterval(watch, 200); }; I tested the code and it never goes to the loop if(map.mapInit) unless I click my button first. What is wrong here?? Tanja _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users