Select to view content in your preferred language

Editor's cross button close event handling

584
1
05-23-2011 04:00 AM
KirillLykov
Emerging Contributor
I use esri.dijit.editing.Editor and want to change the behaviour of the cross button in the edit dialog which appears when a new feature has been added. In particular, I don't want to create a new feature if the validation failed. So I tried to use onCancel, onClose, onHide events in the Editor and in the Editor's AttributeInspector. All these events don't arise when the edit dialog has been closed. I tried to find this cross button object in the Editor - but without success. Do you know the name of this button or another way to handle close event?
0 Kudos
1 Reply
SebastianRoberts
Frequent Contributor
This is an old post, but I thought I would reply in case someone else comes across it searching.  I was looking for the same and came up with the solution below.

dojo.connect(map.infoWindow._hide, "onclick", function(){
    //your code here.  This will only be called when a user clicks the "x" or close button.
    //The infoWindow also has an onhide event that is called more often ( whenever the map is clicked or the info window is closed with escape key or close button clicked).
});
0 Kudos