OpenLayers.Popup closeBoxCallback not fired
this is my first question on stackoverflow and english is not my native language so i want to excuse for errors.

I have a OpenLayers Map with some markers. Every marker has it's own popup to display when clicked on it. If the marker is clicked it should disappear and only the popup should be visible. When the popup is closed the marker should appear again.

    var map = new OpenLayers.Map({
    	div: 'map'
    });
    var markers = new OpenLayers.Layer.Markers('Markers');
    map.addLayers([new OpenLayers.Layer.Google('Google Streets'), markers]);
    
    var closeCallback = function() {
    	console.log("CLOSE!!!");
    	this.marker.display(true);
    	this.hide();
    };
    var clickCallback = function(event) {
    	for (var i = 0; i < map.popups.length; i = i + 1) {
    		if (map.popups[i].visible()) {
    			map.popups[i].hide();
    		}
    	}
    	if (map.popups.indexOf(this.popup) == -1) {
    		map.addPopup(this.popup, false);
    		this.popup.marker = this.marker;
    	}
    	this.popup.show();
    	this.marker.display(!this.popup.visible());
    	OpenLayers.Event.stop(event);
    };
    
    var lonLat1 = new OpenLayers.LonLat(0, 0).transform(defaultProjection, map.getProjectionObject());
    var feature1 = new OpenLayers.Feature(markers, lonLat1);
    var marker1 = feature1.createMarker();
    var popup1 = new OpenLayers.Popup.FramedCloud(
    	'popup1',
    	lonLat1,
    	new OpenLayers.Size(200, 200),
    	'loading...',
    	null,
    	true,
    	closeCallback
    );
    feature1.data.icon = icon.clone();
    feature1.popup = popup1;
    markers.addMarker(marker1);
    marker1.events.register('mousedown', feature1, clickCallback);

    var lonLat2 = new OpenLayers.LonLat(0, 0.5).transform(defaultProjection, map.getProjectionObject());
    var feature2 = new OpenLayers.Feature(markers, lonLat2);
    var marker2 = feature2.createMarker();
    var popup2 = new OpenLayers.Popup.FramedCloud(
    	'popup2',
    	lonLat2,
    	new OpenLayers.Size(200, 200),
    	'loading...',
    	null,
    	true,
    	closeCallback
    );
    feature2.data.icon = icon.clone();
    feature2.popup = popup2;
    markers.addMarker(marker2);
    marker2.events.register('mousedown', feature2, clickCallback);

The event is fired if i click on the close button of the popup. But if i click on the other marker it isn't fired.

    map.addPopup(this.popup, false);

Also when i set *exclusive* (second attribute of *addPopup*) to true so that all popups will be hidden if a new appears the event isn't fired.

Thank you for your help.
OpenLayers.Popup closeBoxCallback not fired
===

this is my first question on stackoverflow and english is not my native language so i want to excuse for errors.

I have a OpenLayers Map with some markers. Every marker has it's own popup to display when clicked on it. If the marker is clicked it should disappear and only the popup should be visible. When the popup is closed the marker should appear again.

    var map = new OpenLayers.Map({
    	div: 'map'
    });
    var markers = new OpenLayers.Layer.Markers('Markers');
    map.addLayers([new OpenLayers.Layer.Google('Google Streets'), markers]);
    
    var closeCallback = function() {
    	console.log("CLOSE!!!");
    	this.marker.display(true);
    	this.hide();
    };
    var clickCallback = function(event) {
    	for (var i = 0; i < map.popups.length; i = i + 1) {
    		if (map.popups[i].visible()) {
    			map.popups[i].hide();
    		}
    	}
    	if (map.popups.indexOf(this.popup) == -1) {
    		map.addPopup(this.popup, false);
    		this.popup.marker = this.marker;
    	}
    	this.popup.show();
    	this.marker.display(!this.popup.visible());
    	OpenLayers.Event.stop(event);
    };
    
    var lonLat1 = new OpenLayers.LonLat(0, 0).transform(defaultProjection, map.getProjectionObject());
    var feature1 = new OpenLayers.Feature(markers, lonLat1);
    var marker1 = feature1.createMarker();
    var popup1 = new OpenLayers.Popup.FramedCloud(
    	'popup1',
    	lonLat1,
    	new OpenLayers.Size(200, 200),
    	'loading...',
    	null,
    	true,
    	closeCallback
    );
    feature1.data.icon = icon.clone();
    feature1.popup = popup1;
    markers.addMarker(marker1);
    marker1.events.register('mousedown', feature1, clickCallback);

    var lonLat2 = new OpenLayers.LonLat(0, 0.5).transform(defaultProjection, map.getProjectionObject());
    var feature2 = new OpenLayers.Feature(markers, lonLat2);
    var marker2 = feature2.createMarker();
    var popup2 = new OpenLayers.Popup.FramedCloud(
    	'popup2',
    	lonLat2,
    	new OpenLayers.Size(200, 200),
    	'loading...',
    	null,
    	true,
    	closeCallback
    );
    feature2.data.icon = icon.clone();
    feature2.popup = popup2;
    markers.addMarker(marker2);
    marker2.events.register('mousedown', feature2, clickCallback);

The event is fired if i click on the close button of the popup. But if i click on the other marker it isn't fired.

    map.addPopup(this.popup, false);

Also when i set *exclusive* (second attribute of *addPopup*) to true so that all popups will be hidden if a new appears the event isn't fired.

Thank you for your help.