javascript - 获取弹出消息 - 此页面需要AC_RunActiveContent.js

时间:2013-01-17 05:00:01

标签: java javascript html jsp

在我的应用程序中,我使用以下代码。当我尝试打开html文件时,我收到弹出消息"This page requires AC_RunActiveContent.js."

我导入了文件AC_RunActiveContent.js。进入我的包裹并提到相同的。   任何人都可以帮我解决这个问题吗? 代码是

<HTML>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
var requiredMajorVersion = 10;
var requiredMinorVersion = 0;
var requiredRevision = 45;
-->
</script>
<BODY bgcolor="#FFFFFF">


<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
    alert("This page requires AC_RunActiveContent.js.");
} 
else {
    var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    if(hasRightVersion) { 
        AC_FL_RunContent(
            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
            'width', '400',
            'height', '250',
            'scale', 'noscale',
            'salign', 'TL',
            'bgcolor', '#777788',
            'wmode', 'opaque',
            'movie', 'charts',
            'src', 'charts',
            'FlashVars', 'library_path=charts_library&xml_source=sample.xml', 
            'id', 'my_chart',
            'name', 'my_chart',
            'menu', 'true',
            'allowFullScreen', 'true',
            'allowScriptAccess','sameDomain',
            'quality', 'high',
            'align', 'middle',
            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
            'play', 'true',
            'devicefont', 'false'
            ); 
    } else { 
        var alternateContent = 'This content requires the Adobe Flash Player. '
        + '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';
        document.write(alternateContent); 
    }
}
// -->
</script>
<noscript>
    <P>This content requires JavaScript.</P>
</noscript>

</BODY>
</HTML>

1 个答案:

答案 0 :(得分:1)

您要将变量值分配给0:

AC_FL_RunContent = 0; <--
DetectFlashVer = 0;   <--

并检查它:

if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
    alert("This page requires AC_RunActiveContent.js.");
} 
else {
....

请尝试删除前两个变量,并检查 AC_RunActiveContent.js 脚本是否已加载