469,133 Members | 1,032 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,133 developers. It's quick & easy.

Problem: Flash in iframe in Firefox doesn't display

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.createContext ualFragment(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

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

Aug 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by mike | last post: by
1 post views Thread by swat.ru | last post: by
6 posts views Thread by Valued Customer | last post: by
26 posts views Thread by shlomi.schwartz | last post: by
18 posts views Thread by len.hartley | last post: by
5 posts views Thread by althafexcel | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.