B
biswaranjan.rath
Hi,
I'm facing problem after doing replaceChild for a DOCUMENT ELEMENT.
Sample code:
elem = document.getElementById( "myEle" );
var newVal;
newVal = document.createElement('textbox');
newVal.setAttribute( "id", "myEle" );
newVal.setAttribute( "value", "myValue" );
newVal.appendChild(document.createTextNode('Displaying Textbox'));
intAction.parentNode.replaceChild( newVal, elem );
after this, i'm trying to get the element again by
elem = document.getElementById( "myEle" );
But it returns NULL.
Please help.
Biswaranjan
I'm facing problem after doing replaceChild for a DOCUMENT ELEMENT.
Sample code:
elem = document.getElementById( "myEle" );
var newVal;
newVal = document.createElement('textbox');
newVal.setAttribute( "id", "myEle" );
newVal.setAttribute( "value", "myValue" );
newVal.appendChild(document.createTextNode('Displaying Textbox'));
intAction.parentNode.replaceChild( newVal, elem );
after this, i'm trying to get the element again by
elem = document.getElementById( "myEle" );
But it returns NULL.
Please help.
Biswaranjan