Sevinfooter wrote:
<snip>
function changeLabelText(controlID)
{
var thisLabel = document.getElementById(controlID);
<snip>
<label for="radio1" id="radioLabel"
onclick="changeLabelText(this.id)">Some Text</label>
What is the rational of passing - this.id - and then using the ID
string passed with the - document.getElementById - method to look up a
reference to the LABEL element? Given that IDs must be unique within a
document and the - id - property of an element reflects its ID
attribute the element returned from document.getElemetnById must be the
same element as the - this - in - this.id -, so you may as well just
pass - this - and have the element reference in the function directly.
<input id="radio1" type="radio" />
<snip ^
And why the pseudo XHTML mark-up in a document that could only be HTML?
Richard.