flash - Destroying embed objects using javascript -


I have a video that automatically shows in the lower left corner of the user when a page loads. The user can press a button to destroy the joint, unfortunately it does not completely destroy it. Flash options are still available to play that can be problematic if their pages (like buttons) have functional elements and the ad is blocking the user's use of elements. Additional information: The video ad is being used as part of the embedded tag, and clients are using a Javascript to include the video in your page.

I also have to do this work using an iframe for this flash part, but its behavior is not compatible between each browser, so I want to stay away from putting it in an iframe.

I do not know the flash and do not even have a flash source.

You can use JQuery:

  $ (' Ads'). Deletion ();  

This should completely remove this part from the HTML code. In pure javascript, you should know the original tag, you certainly do not know. (And parents will not be removed)

  & lt; Div id = "parentdiv" & gt; & Lt; Div id = "YourAd" class = "ads" & gt; This is another paragraph. & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script & gt; Var Parent = document.getElementById ("parentDiv"); Var children = document.getElementById ("YourAd"); Parent.removeChild (child); & Lt; / Script & gt;  


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -