just added
<toolbox>
<toolbar id="test-toolbar">
<label value="Command:" control="CommandLabel"/>
<textbox id="CommandTxt"/>
<button id="ExecuteBtn" label="Execute" oncommand="test();"/>
</toolbar>
</toolbox>
and in js file that XUL file refers, just add test() function. But if I
want to get the value in the textbox when I click the button, how could
I do?
getElementById looks like only work for Document. But for toolbar
elements, how shall I do?
thanks
Roger
document.getElementById("CommandTxt").value;
just added
<toolbox>
<toolbar id="test-toolbar">
</toolbox>
thanks
Roger
_______________________________________________
dev-extensions mailing list
dev-ext...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-extensions
is this correct? it has no response to me
Thanks
Roger
Thanks
Roger Yu 写道:
> ----- Original Message ----
> From: Roger Yu <roge...@msn.com>
> >
> > is this correct? it has no response to me
> >
Read http://developer.mozilla.org/en/docs/Extension_FAQ and check if
there are any errors in JS console.
Nickolay
Nickolay
On 10/3/06, LouCypher <moz.lo...@gmail.com> wrote:
> Use window.document
>
> function test() {
> var win = window;
> var txt = win.document.getElementById('CommandTxt').value;
> alert(txt);
> }
>
> or just document
>
> function test() {
> var txt = document.getElementById('CommandTxt').value;
> alert(txt);
> --
> LouCypher