You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Showers, Cory R" <co...@lmco.com> on 2006/07/17 22:19:59 UTC
[tobago] - how to change label values dynamically?
I am trying to change Tobago <tc:label> value while the web app runs.
I am doing some ajax and the label value isn't finalized until I parse
the xml files I can change <tc:in> values dynamically but not label.
This is what works
document.getElementById("selform:val2").value =
myDataKeys[0].childNodes[0].nodeValue;
<tc:in value="" id="val2"/>
This doesn't work
document.getElementById("selform:val1").value =
myDataKeys[0].childNodes[0].nodeValue;
<tc:label value="" id="val1"/>
Any ideas on getting the label values changed?
Cory Showers
Software Engineer
Lockheed Martin MS2
(w) 856.866.6075
Re: [tobago] - how to change label values dynamically?
Posted by Volker Weber <we...@googlemail.com>.
Hi Cory,
the label element has no value property, try innerHTML instead.
document.getElementById("selform:val1").innerHTML =
myDataKeys[0].childNodes[0].nodeValue;
regards,
Volker
2006/7/17, Showers, Cory R <co...@lmco.com>:
>
>
>
>
> I am trying to change Tobago <tc:label> value while the web app runs.
>
>
>
> I am doing some ajax and the label value isn't finalized until I parse the
> xml files I can change <tc:in> values dynamically but not label.
>
>
>
> This is what works
>
> document.getElementById("selform:val2").value =
> myDataKeys[0].childNodes[0].nodeValue;
>
> <tc:in value="" id="val2"/>
>
>
>
> This doesn't work
>
> document.getElementById("selform:val1").value =
> myDataKeys[0].childNodes[0].nodeValue;
>
> <tc:label value="" id="val1"/>
>
>
>
> Any ideas on getting the label values changed?
>
>
>
> Cory Showers
>
> Software Engineer
>
> Lockheed Martin MS2
>
> (w) 856.866.6075
>
>