In the script
file, two functions are implemented to handle input events. |
|
The first one
adds a valid item to the list, by constructing XUL nodes using the W3C DOM
API, setting properties and then appending them to the list node. |
|
The second one
checks the value of the text box every time the user enters a key while the
field is focused, making sure the ÒAdd ItemÓ button is only ever enabled when
the value in the field is not blank. |
|
LetÕs see how
this all comes togetherÉ |
|