Get the element id of a Dwt button to change its listener event

Interested in talking about Mash-up's? This is the place.
Post Reply
vdagost-fr
Posts: 43
Joined: Mon Apr 11, 2016 11:59 am

Get the element id of a Dwt button to change its listener event

Post by vdagost-fr »

Hi guys

I'm trying to get the id of the "New signature" button (which is in the signatures preference menu) to change its behavior (set a new listener).

Its internal ID changes at each webmail reload. How could I get its internal id using javascript ?

With Firebug i've found the css class and its random html class name Dwtxxx and in the java zimbra source code i've found a hint :

Code: Select all

// Signature ADD
var addEl = document.getElementById(this._htmlElId + "_SIG_NEW");
var button = new DwtButton(this);
button.setText(ZmMsg.newSignature);
button.addSelectionListener(this._handleAddButton.bind(this));
this._replaceControlElement(addEl, button);
this._sigAddBtn = button;
But I did not find how to use it :(

Regards
Victor
vdagost-fr
Posts: 43
Joined: Mon Apr 11, 2016 11:59 am

Re: Get the element id of a Dwt button to change its listener event

Post by vdagost-fr »

Hi all

As I said the id changes at every reload.

Any help ?
Post Reply