Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1056631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:44:32+00:00 2026-05-16T17:44:32+00:00

So for example I have a structure like this: Javascript function toggle(id){ var element

  • 0

So for example I have a structure like this:

Javascript

function toggle(id){
    var element = document.getElementById("id");

    if(element.style.display != 'block'){
        element.style.display = 'none';
    } else {
        element.style.display = 'block';
    }
}

HTML

<div onclick="toggle('holder')">Toggle Video</div>

<div id="holder" style="display:none">
   <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/A_hp2ubJaNo?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/A_hp2ubJaNo?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
</div>

When I click Toggle Video the video shows up and starts playing, when I click it again the video hides out but the video is still playing in Internet Explorer!

Please do not post any answers with jQuery or any library, only pure Javascript, thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:44:33+00:00Added an answer on May 16, 2026 at 5:44 pm

    Toggling the CSS display property is not a reliable way of killing Flash. As you have discovered, the behaviour is different between browsers. You’d be better off clipping the element from the DOM using domElement.parentNode.removeChild(domElement)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple structure like this: (def example {:bbb bbb :xxx [1 2
i have problem using LIKE structure in DB2 : for example: select * from
Example: I have a selector like this, which I give to another method as
Suppose I have 1) a HTML document. 2) This HTML document loads Javascript file
I have a sparse array (indexes are not consecutive) like this: var testArray =
I would like to create a structure within javascript. I have a pair of
Let's say I have a structure like this: <folder name=folder1> <folder name=folder2> <bookmark href=link.html>
I have an SVN repo with structure like this: /branch /tags /trunk /trunk/module1 /trunk/module2
I have following structure with example data: id season_id title 1 1 Intro 2
For example I have a file name call A.java. Here its structure: public class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.