You are no getting it. Now, where did you get this
document.txtBox.box1
?
Do this:
textBox = document.getElementById("txtBox.box1");
function someTest() {
alert(textBox.value);
}
textBox.addEventListener("onkeyup", someTest, false);
I understand this is just for testing. In real life, you can use the event handler with a parameter, or setup the handler on the element typw, or, even better jQuery approach.
If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[
^],
http://jquery.com[
^],
http://learn.jquery.com[
^],
http://learn.jquery.com/using-jquery-core[
^],
http://learn.jquery.com/about-jquery/how-jquery-works[
^] (start from here).
To add a handler in HTML, use something like
<input type="text" onkeyup="someTest();" />
—SA