开发者

How to prevent page from refreshing when AC_FL_RunContent() is called twice

I'm using JQuery to create a button that (when clicked), removes a flash video from the page.

Note: Unfortunately, I can't simply use hide(). I must remove() because hiding doesn't stop the video in ie开发者_开发百科8 and the sound continues to play.

After the video is removed I would like it to reappear when a "show video" button is clicked.

Note: I tried to accomplish this with clone() and detach()... The video appears but does not play and has missing controls in IE only. Other browsers work fine.

The video is initially added to the page using the AC_FL_RunContent() function.

The issue is that when I try to add the "removed" video back to the page by calling AC_FL_RunContent( 'codebase'... The page refreshes and shows only the video. Everything else has disappeared.

How can I prevent that from happening?


Using Mark´s idea i changed:

document.write(str); (in function AC_Generateobj)

by

document.getElementById("video_container").innerHTML=str;

Works great !

Cheers

Matias


That's because AC_FL_RunContent() performs a document.write() rewriting your whole document after the page has been loaded. You'd have to dig into the function and see if it allows you to grab a string to output to the page rather than running the document.write() function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜