By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,979 Members | 951 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,979 IT Pros & Developers. It's quick & easy.

remove FLASH object in IE

P: 54
Hi,

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
  1. <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>
  2. <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&amp;radioURL=globaltags%2Frock&amp;title=Music+tagged+rock+&amp;theme=red&amp;autostart=&amp;lang=en&amp;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&amp;colour=red&amp;size=regular&amp;autostart=&amp;from=code&amp;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&amp;colour=red&amp;size=regular&amp;autostart=&amp;from=code&amp;widget=radio&amp;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 + '&amp;resize=0','lfm_popup','height=240,width=234,resizable=yes,scrollbars=yes'); return false;"></a></td></tr></table></td></tr></table>
  3.  
Jan 12 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.