Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Javascript Flash CSS

Hows it going.

I am working on a web page where I have multiple div tags holding different content. One of my div tags holds a flash file where a user will enter data. If the user hits an html button I want to hide the flash content by adjusting the style display of the div tag to none. and then re display it content entered and all to the screen when the user hits the display button.

I have this successfully running while viewing from an IE browser but when I try to view it from fire fox the flash file is hidden and then when it is re displayed loses all data it had , almost like as if I refreshed the page.

my question is has anyone encountered this before and if not could you provide any suggestions on how I could get this to act the same as it does in IE.

my code is as follows

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualStudio.HTML>
<meta name=Originator content="Microsoft Visual Studio .NET 7.1">

<script language="javascript">

function hideFlash(){

document.getElementById("panel3").style.display='none';
}

function displayFlash(){

document.getElementById("panel3").style.display ='';

}

</script>
</head>
<body>
<input type="button" id="hide" onclick="javascript:hideFlash();" value="hide">
<input type="button" id="display" onclick="javascript:displayFlash();" value="display">

<div id="panel3">
<embed src="flashVisible.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width ="550" height="400"></embed>
</div>

</body>
</html>



I have attached two files so you could see what my issue is. try to run the html in IE then in FF.

Any suggestions would be sweet thanks
[2168 byte] By [chrisz] at [2007-11-11 7:08:24]