Problem: Flash in iframe in Firefox doesn't display

C

chaitatp

Hi friends,

I've got a problem about inserting Flash in iframe in Firefox. The
codes are:

---- test.html ----
<html>
<head>
<script type="text/javascript">
function doBodyOnLoad()
{
var myIFrame = document.getElementById('myIFrame');
myIFrame.contentWindow.document.designMode = 'on';
}

function doPaste()
{
var myIFrame = document.getElementById('myIFrame');
var currentSelection = myIFrame.contentWindow.getSelection();
var currentRange = currentSelection.getRangeAt(0);

// var html = "<b>hello world</b>";
// var html = '<img
src="http://mail.google.com/mail/help/images/logo.gif"/>';
var html = '<EMBED src="http://thaiunix/~chaitat/GOT/MacOS.swf"
quality="high" menu="true"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" width="114" height="76"></EMBED>';

if (html != null)
{
// Assume Firefox
currentRange.insertNode(currentRange.createContextualFragment(html));
}
}
</script>
</head>
<body onLoad="doBodyOnLoad();">
<input type="button" onClick="doPaste();"/>
<iframe id="myIFrame" src="test2.html" width="100%"
height="50%"></iframe>
</body>
</html>

---- test2.html ----
<html>
<body>
</body>
</html>



When I click the button, the Flash is inserted but doesn't display. I
need help. Thank you very much.

Y_Y
 
C

chaitatp

This way I can use to insert "image" or other tag like, for example,
<B>, <I>, ...
Also Flash (<EMBED>) but it doens't display.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top