add controls to placeholder control using javascript
<p>i tried to add my element creates using javascript to asp:placeholder control but it is not getting added. pls suggest a possible solution for this.
thanks in advance.
this is my code:</p>

<pre><code> function UpdateLabel(e,newValue) 
 {
 var characterCode
 if(e &amp;&amp; e.which){ // NN4 specific code

 e = e

 characterCode = e.which

  }


  else {

  e = event
 characterCode = e.keyCode // IE specific code

 }

 if(characterCode==188)

  {

    alert(characterCode);

    var array = newValue.split(",");

    if(array.length==1)
{


}

 else if ((array[array.length-2]!=""))

{

alert(array[array.length-2]);

var controlRef = document.createElement('a');
controlRef.href = '#';

controlRef.innerHTML = array[array.length-2];
controlRef.style.visibility = 'visible';

controlRef.onclick = function () { alert(array[array.length-2]); };
document.body.appendChild(controlRef); 

var oEL = document.getElementById('&lt;%=PlaceHolder1.ClientID %&gt;');
oEL=document.createAttribute(controlRef); 

oEL.appendChild(controlRef);
alert("oEL:"+oEL);
 }
</code></pre>

<p>i tried using insertBefore() also. but that does nt work</p>
