Java脚本无法在Chrome中运行 [英] Java script is not working in Chrome

查看:371
本文介绍了Java脚本无法在Chrome中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

The code below works fine on IE and FF but not on Google Chrome. 
Please can someone help me to find out the mistake?.Thanks In Advance.







Flex Code: 
Public function init():void
{
ExternalInterface.addCallback("getCloseConfirmMessage", closeConfirmMessage);
	
ExternalInterface.call("setUpBeforeUnload",FlexGlobals.topLevelApplication.id);
}
Public function closeConfirmMessage():void
{
	//DB updation code  
}







Java Script :
  <script language="javascript" type="text/javascript">
    var fxControl;
    function confirmClose()
    {
alert("Please click OK to end the session");                             fxControl.getCloseConfirmMessage();
    };
    function setUpBeforeUnload( appName )
    {
        fxControl = document[ appName ] || window[ appName ];
window.onbeforeunload = confirmClose;
    };

</script>

推荐答案

您已经在http://www.codeproject.com/Messages/4483148/Java-Script-is-not-working-in-Chrome。 aspx [ ^ ]。请仅在一个论坛发帖。
You already posted this question at http://www.codeproject.com/Messages/4483148/Java-Script-is-not-working-in-Chrome.aspx[^]. Please post in one forum only.


这篇关于Java脚本无法在Chrome中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆