Hi,
How can I get the value of To (CC) field in composer window when developing an addon? Or is there an extensive list of all elementids?
My searches on Google did not really return any interesting results.
regards,
Pascal
javascript elementid for To field in composer window
-
- Posts: 21
- Joined: May 29th, 2005, 3:16 am
- Location: Wien
- Contact:
-
- Posts: 6403
- Joined: February 3rd, 2009, 6:29 pm
Re: javascript elementid for To field in composer window
Try these:
Reference
http://dxr.mozilla.org/comm-release/sou ... ommands.js
http://dxr.mozilla.org/comm-release/sou ... Overlay.js
DOM Inspector Plus!
http://addons.thunderbird.net/thunderbird/addon/254571
http://developer.mozilla.org/docs/Tools ... _Inspector
Code: Select all
AddRecipient("addr_to", "foo bar <test@invalid.com>");
Code: Select all
var row = 1;
var popup = awGetPopupElement(row);
var input = awGetInputElement(row);
alert(popup.label); // To:
alert(popup.value); // addr_to
alert(input.value); // foo bar <test@invalid.com>
http://dxr.mozilla.org/comm-release/sou ... ommands.js
http://dxr.mozilla.org/comm-release/sou ... Overlay.js
DOM Inspector Plus!
http://addons.thunderbird.net/thunderbird/addon/254571
http://developer.mozilla.org/docs/Tools ... _Inspector
-
- Posts: 21
- Joined: May 29th, 2005, 3:16 am
- Location: Wien
- Contact:
Re: javascript elementid for To field in composer window
Hi Morat,
Sorry, I don't get it. DOM inspector does not work on composewindow and in the reference you posted I do not really see how to get To-field or how to set/change it. You example would only be helpful if I wanted to add a new addressee.
What I want to do is get To and/or CC field and check against some domains, if true, than change address to whatever address I set as string.
regards,
Pascal
Sorry, I don't get it. DOM inspector does not work on composewindow and in the reference you posted I do not really see how to get To-field or how to set/change it. You example would only be helpful if I wanted to add a new addressee.
What I want to do is get To and/or CC field and check against some domains, if true, than change address to whatever address I set as string.
regards,
Pascal
-
- Posts: 6403
- Joined: February 3rd, 2009, 6:29 pm
Re: javascript elementid for To field in composer window
DOM Inspector Plus! works in the compose window in Thunderbird 60.
Here is how to select an element in DOMi.
* 3pane window, File > New > Message ( i.e. open compose window )
* 3pane window, Tools > DOM Inspector
* DOMi window, File > Inspect Chrome Document > chrome://messenger/content/messengercompose/messengercompose.xul picture
* DOMi window, click "Find a node to inspect by clicking on it" button (top left)
* compose window, click "To:" field
Here is how to select an element in DOMi.
* 3pane window, File > New > Message ( i.e. open compose window )
* 3pane window, Tools > DOM Inspector
* DOMi window, File > Inspect Chrome Document > chrome://messenger/content/messengercompose/messengercompose.xul picture
* DOMi window, click "Find a node to inspect by clicking on it" button (top left)
* compose window, click "To:" field
-
- Posts: 6403
- Joined: February 3rd, 2009, 6:29 pm
Re: javascript elementid for To field in composer window
Are you asking for the element id for the "To:" field in the compose window in the original post?
The id for the recipient type popup element for row 1 is "addressCol1#1".
The id for the recipient input element for row 1 is "addressCol2#1".
Reference
http://dxr.mozilla.org/comm-release/sou ... Overlay.js
The id for the recipient type popup element for row 1 is "addressCol1#1".
The id for the recipient input element for row 1 is "addressCol2#1".
Reference
http://dxr.mozilla.org/comm-release/sou ... Overlay.js