show-hide-object.html   [plain text]

<html lang="en">
<p><b>BUG ID:</b> <a href="rdar://problem/3572507">3572507</a> Flash in div with display:none style will not redraw when style changed to display:block (3479)</p>

<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> <br>
1. Verify that there is a Flash animation playing below.<br>
2. Click "Hide Flash".<br>
3. Click "Show Flash".<br>

<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
The Flash movie hides when "Hide Flash" is clicked, and shows again when "Show Flash" is clicked.

<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
The Flash movie hides when "Hide Flash" is clicked, but does not show again when "Show Flash" is clicked.  Clicking on "Hide Flash" and then "Show Flash" again will show the movie.

<script language="JavaScript">

	// 2 html tabs for multiple flash/java
	var selected = "tab1";
	function tabClick(whichTab) {
	  selected = whichTab;
	  if (whichTab == "tab1") {
		 document.getElementById('tab1').style.display = "block";
		 document.getElementById('tab2').style.display = "none";
	  else if (whichTab == "tab2") {
		 document.getElementById('tab2').style.display = "block";
		 document.getElementById('tab1').style.display = "none";


	<input type=button value="Hide Flash" onClick="tabClick('tab2')"><input type=button value="Show Flash" onClick="tabClick('tab1')">

	<div id="tab2" style="display: none">
	Flash hidden.

	<div id="tab1">
		<object id="scopeFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="200" codebase=",0,0,0">
		  <param name="movie" value="resources/spinbox.swf">
		  <param name="quality" value="high">
			<embed src="resources/spinbox.swf" width="300" height="200" quality="high" pluginspage="">