Hi XUL Group,
I have a problem with the textbox element in XUL unable to set new values to
its VALUE property as it changes (As I call the onchange event)
Here's my code snippet in XUL File
<hbox>
<label value="LABEL"/>
<textbox id="txtBoxLabel" onchange="setTheNewValues()"/>
</hbox>
<hbox>
<button label="NEW TEST" onclick="setElemProps()>
</hbox>
IN THE .JS FILE
//Initially the values are set using a default label for BUTTON
function setElemProps()
{
document.getElementById("button1").setAttribute("label","HELLO");
}
//ON CHANGE OF TEXT IN TEXTBOX a BUTTON'S (button1) LABEL SHOULD CHANGE
ACCORDINGLY:
function setTheNewValues()
{
tempNewValue = document.getElementById("txtBoxLabel").getAttribute("value");
alert(tempNewValue);
document.getElementById("button1").setAttribute("label",tempNewValue);
}
The problem is the VALUE property in TEXTBOX stays the same and does not
change. Is there any refresh knid of mechanism where the moment I change the
VALUE in TEXTBOX, the LABEL in BUTTON(button1) changes.
Please Help me in this matter as its critical for a project.
Thanks in advance
(Karthik)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
xul-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xul-talk