Re: help on removing element using yui
- From: michael@xxxxxxxxxxxxxx
- Date: Wed, 29 Aug 2007 23:16:40 -0700
Hi Shotokan,
If you want to remove the element you just added. Then you need to
find te object. and get its parent.
var obj =document.getElementById('mplayer');
obj.parentNode.removeChild(obj);
On Aug 30, 6:08 am, shotokan99 <soft_devj...@xxxxxxxxx> wrote:
just a basic question. i added an element on my page using javascript,
that goes like this:
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.
.
- Follow-Ups:
- Re: help on removing element using yui
- From: shotokan99
- Re: help on removing element using yui
- References:
- help on removing element using yui
- From: shotokan99
- help on removing element using yui
- Prev by Date: Re: Event Handling Question
- Next by Date: Re: help on removing element using yui
- Previous by thread: help on removing element using yui
- Next by thread: Re: help on removing element using yui
- Index(es):
Relevant Pages
|