J
Jan-Friedrich Mutter
Hi,
I have a problem to access a hidden field by javascript. The name of
the field has a dot in it. That's the problem. But I need that dot
because it is a "Stuts Property".
I'm using IE 6. This is my code:
<!--
function changeValue(myvalue) {
//works
document.forms[0].testProperty.value = myvalue;
alert('document.forms[0].testProperty.value='+document.forms[0].testProperty.value);
//doesn't work
//(javascript error:
//document.forms[0].dotted.prop is null or not an object)
document.forms[0].dotted.prop.value = myvalue;
alert('document.forms[0].dotted.prop.value='+document.forms[0].testProperty.value);
}
//-->
<form>
<input type="hidden" name="testProperty" value="">
<input type="hidden" name="dotted.prop" value="">
</form>
Any comments are appreciated.
Cheers,
Jan.
I have a problem to access a hidden field by javascript. The name of
the field has a dot in it. That's the problem. But I need that dot
because it is a "Stuts Property".
I'm using IE 6. This is my code:
<!--
function changeValue(myvalue) {
//works
document.forms[0].testProperty.value = myvalue;
alert('document.forms[0].testProperty.value='+document.forms[0].testProperty.value);
//doesn't work
//(javascript error:
//document.forms[0].dotted.prop is null or not an object)
document.forms[0].dotted.prop.value = myvalue;
alert('document.forms[0].dotted.prop.value='+document.forms[0].testProperty.value);
}
//-->
<form>
<input type="hidden" name="testProperty" value="">
<input type="hidden" name="dotted.prop" value="">
</form>
Any comments are appreciated.
Cheers,
Jan.