The problem is solved!
I used onCommand
instead of oncommand
Pergunta
I've got such XUL
form
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" height="300" id="hello" width="300">
<groupbox>
<caption label="Calculator"/>
<grid>
<columns>
<column/>
</columns>
<rows>
<row>
<hbox>
<textbox flex="1" id="input"/>
</hbox>
</row>
<row>
<hbox>
<button id="1" label="1" onCommand="alert('Hello world 1!');"/>
<button id="2" label="2" onCommand="alert('Hello world 2!');"/>
<button id="3" label="3" onCommand="alert('Hello world 3!');"/>
</hbox>
</row>
<row>
<hbox>
<button id="4" label="4" onCommand="alert('Hello world 4!');"/>
<button id="5" label="5" onCommand="alert('Hello world 5!');"/>
<button id="6" label="6" onCommand="alert('Hello world 6!');"/>
</hbox>
</row>
<row>
<hbox>
<button id="7" label="7" onCommand="alert('Hello world 7!');"/>
<button id="8" label="8" onCommand="alert('Hello world 8!');"/>
<button id="9" label="9" onCommand="alert('Hello world 9!');"/>
</hbox>
</row>
<row>
<hbox>
<button label="0"/>
<button label="C"/>
<button label="="/>
</hbox>
</row>
</rows>
</grid>
</groupbox>
</window>
But when I click any button - nothing happens. If I set onClick
instead of onCommand
- it doesn't work either.
I use Mozilla Remote XUL and XULExplorer to test my application. But it doesn't work there.
What's the problem?
P.S I've installed old version of mozilla browser - and it doesn't work there either
Solução
The problem is solved!
I used onCommand
instead of oncommand