just a basic question. i added an element on my page using javascript, that goes like this:
- PHP: Select all
var r=document.getElementById('d_main');
var k=document.createElement('object');
k.setAttribute('id','mplayer');
k.setAttribute('width','320');
k.setAttribute('height','286');
k.setAttribute('classid','CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95');
k.setAttribute('standby','Loading Windows Media Player components...');
k.setAttribute('type','application/x-oleobject');
k.setAttribute('codebase','http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112');
k.innerHTML='<param name="Showcontrols" value="True"><embed src="../movie/Madagascar.avi" width=320 height=240 type="application/x-mplayer2" name="MediaPlayer"></embed>';
r.appendChild(k);
actually its a windows media player ;-) now is it possible to remove the element using
yui method such as purgeElement() , etc? if so, can someone pls give me a code snippet on how to do it.
tnx.