help on removing element using yui

This is a discussion on "help on removing element using yui" within the JavaScript Forum section. This forum, and the thread "help on removing element using yui are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 30th, 2007, 04:10
New Member
Join Date: Mar 2007
Location: phils
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
help on removing element using yui

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.

Last edited by Daniel; Aug 30th, 2007 at 13:14.
Reply With Quote

  #2 (permalink)  
Old Aug 31st, 2007, 13:42
Up'n'Coming Member
Join Date: Aug 2007
Location: Bicester
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Re: help on removing element using yui

Hi

r.removeChild(r.childNodes.item(1))

Justin
Reply With Quote
Reply

Tags
element, javascript, purgeelement, removechild, yui

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Inherited Color in CSS qzplx Web Page Design 1 May 21st, 2008 10:53
Removing objects in an array breepupetstofight ASP.NET Forum 0 Sep 17th, 2007 13:00
Removing + from PHP GET sanctumsolitude PHP Forum 1 Jun 23rd, 2007 02:49
removing whitespace dudester123 Web Page Design 3 Sep 1st, 2006 14:23
XHTML Block Element in an Inline Element gohankid77 Web Page Design 6 Jul 27th, 2004 10:15


All times are GMT. The time now is 10:23.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43