I'm embedding a last.fm flash widget.
I want to be able to remove it from the page using javascript.
I've tried to delete the html element that contains the code but it keeps playing in IE. In FF it stops playing but I can't tell if it is removed or not.
Can I do it in javascript or maybe I need a FLASH script to do it?
The last.fm widget:
Expand|Select|Wrap|Line Numbers
- <style type="text/css">table.lfmWidgetdfb093ba7ed9f3fb5a98bf30a3de5d48 td {margin:0 !important;padding:0 !important;border:0 !important;}table.lfmWidgetdfb093ba7ed9f3fb5a98bf30a3de5d48 tr.lfmHead a:hover {background:url(http://cdn.last.fm/widgets/images/en/header/radio/regular_red.png) no-repeat 0 0 !important;}table.lfmWidgetdfb093ba7ed9f3fb5a98bf30a3de5d48 tr.lfmEmbed object {float:left;}table.lfmWidgetdfb093ba7ed9f3fb5a98bf30a3de5d48 tr.lfmFoot td.lfmConfig a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/red_np.png) no-repeat 0px 0 !important;;}table.lfmWidgetdfb093ba7ed9f3fb5a98bf30a3de5d48 tr.lfmFoot td.lfmView a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/red_np.png) no-repeat -85px 0 !important;}table.lfmWidgetdfb093ba7ed9f3fb5a98bf30a3de5d48 tr.lfmFoot td.lfmPopup a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/red_np.png) no-repeat -159px 0 !important;}</style>
- <table class="lfmWidgetdfb093ba7ed9f3fb5a98bf30a3de5d48" cellpadding="0" cellspacing="0" border="0" style="width:184px;"><tr class="lfmHead"><td><a title="Music tagged rock " href="http://www.last.fm/listen/globaltags/rock" target="_blank" style="display:block;overflow:hidden;height:20px;width:184px;background:url(http://cdn.last.fm/widgets/images/en/header/radio/regular_red.png) no-repeat 0 -20px;text-decoration:none;border:0;"></a></td></tr><tr class="lfmEmbed"><td><object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/19.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="184" height="140" > <param name="movie" value="http://cdn.last.fm/widgets/radio/19.swf" /> <param name="flashvars" value="lfmMode=radio&radioURL=globaltags%2Frock&title=Music+tagged+rock+&theme=red&autostart=&lang=en&widget_id=dfb093ba7ed9f3fb5a98bf30a3de5d48" /> <param name="bgcolor" value="d01f3c" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="always" /> <param name="allowNetworking" value="all" /> </object></td></tr><tr class="lfmFoot"><td style="background:url(http://cdn.last.fm/widgets/images/footer_bg/red.png) repeat-x 0 0;text-align:right;"><table cellspacing="0" cellpadding="0" border="0" style="width:184px;"><tr><td class="lfmConfig"><a href="http://www.last.fm/widgets/?url=globaltags%2Frock&colour=red&size=regular&autostart=&from=code&widget=radio" title="Get your own widget" target="_blank" style="display:block;overflow:hidden;width:85px;height:20px;float:right;background:url(http://cdn.last.fm/widgets/images/en/footer/red_np.png) no-repeat 0px -20px;text-decoration:none;border:0;"></a></td><td class="lfmView" style="width:74px;"><a href="http://www.last.fm/" title="Visit Last.fm" target="_blank" style="display:block;overflow:hidden;width:74px;height:20px;background:url(http://cdn.last.fm/widgets/images/en/footer/red_np.png) no-repeat -85px -20px;text-decoration:none;border:0;"></a></td><td class="lfmPopup"style="width:25px;"><a href="http://www.last.fm/widgets/popup/?url=globaltags%2Frock&colour=red&size=regular&autostart=&from=code&widget=radio&resize=1" title="Load this radio in a pop up" target="_blank" style="display:block;overflow:hidden;width:25px;height:20px;background:url(http://cdn.last.fm/widgets/images/en/footer/red_np.png) no-repeat -159px -20px;text-decoration:none;border:0;" onclick="window.open(this.href + '&resize=0','lfm_popup','height=240,width=234,resizable=yes,scrollbars=yes'); return false;"></a></td></tr></table></td></tr></table>