J
Josh
Hi,
After I clone an element, I can no longer reference the original
element by name.
<html>
<head>
<script>
function cloneElement() {
var templateRow = document.getElementById('id1');
var newRow = templateRow.cloneNode(true);
newRow.id = 'id2';
newRow.name = 'name2';
newRow.value = 'value2';
templateRow.parentNode.appendChild(newRow);
alert('Original Value: ' + templateRow.value);
templateRow = document.local['name1'];
alert('Original Value no longer accessible: ' +
templateRow.value);
}
</script>
</head>
<body onload="cloneElement();">
<form name="local">
<input id="id1" name="name1" type="text" value="value1">
</form>
</body>
</html>
This seems to be problem only in IE. Is this a known issue? Am I
doing something incorrectly?
Thank you for any help.
Josh Rauscher
josh dot rauscher at gmail dot com
After I clone an element, I can no longer reference the original
element by name.
<html>
<head>
<script>
function cloneElement() {
var templateRow = document.getElementById('id1');
var newRow = templateRow.cloneNode(true);
newRow.id = 'id2';
newRow.name = 'name2';
newRow.value = 'value2';
templateRow.parentNode.appendChild(newRow);
alert('Original Value: ' + templateRow.value);
templateRow = document.local['name1'];
alert('Original Value no longer accessible: ' +
templateRow.value);
}
</script>
</head>
<body onload="cloneElement();">
<form name="local">
<input id="id1" name="name1" type="text" value="value1">
</form>
</body>
</html>
This seems to be problem only in IE. Is this a known issue? Am I
doing something incorrectly?
Thank you for any help.
Josh Rauscher
josh dot rauscher at gmail dot com