How to remove actionList items in InfoWindow/Popup

5932
3
Jump to solution
03-28-2012 01:32 PM
ChadWilcomb
New Contributor III
I have been able to successfully add items to the popup/infoWindow, like this

    var detailsLink = dojo.create("a", {         "class": "action",         "innerHTML": "Details",         "href": "javascript:void(0);"     }, dojo.query(".actionList", map.infoWindow.domNode)[0]);      dojo.connect(detailsLink, "onclick", function (evt) {         var feature = map.infoWindow.getSelectedFeature();         ExecuteViewPermit(feature.attributes.PermitNumber);     });


But how can I remove the default 'Zoom To' anchor tag?

I have tried adding variations of dojo/jQuery destroy/remove functions using the class selectors to my init and map onLoad functions:

dojo.destroy('.zoomTo');
$('.zoomTo').remove();

Any suggestions?

Thanks,
Chad
0 Kudos
1 Solution

Accepted Solutions
DavidSpriggs
New Contributor II
The ZoomTo link has an additional css class assigned to it. To remove (actually hide) only the ZoomTo link, but leave the other links you have created, use this css:

.esriPopup .actionsPane .zoomTo {     display: none; }

View solution in original post

0 Kudos
3 Replies
StephenLead
Regular Contributor III
You can knock it out in CSS:

.esriPopup .actionsPane {
    display: none;
}
0 Kudos
DavidSpriggs
New Contributor II
The ZoomTo link has an additional css class assigned to it. To remove (actually hide) only the ZoomTo link, but leave the other links you have created, use this css:

.esriPopup .actionsPane .zoomTo {     display: none; }
0 Kudos
ChadWilcomb
New Contributor III
Thanks David & stevel, why didn't I think of using CSS?

Incidentally, I used the same technique to knock out the maximize button on the popup as well...

.esriPopup .actionsPane .zoomTo {
     display: none;
}
.esriPopup .titleButton.maximize {
     display: none;
}