对象#在chrome中没有方法'showModalDialog'。 [英] Object # has no method 'showModalDialog' in chrome.

查看:92
本文介绍了对象#在chrome中没有方法'showModalDialog'。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



请考虑以下代码:



Hi there,

Consider the following code:

function ShowWelcomeDialog() {
        var data = {};
        
        var options = {
            url: "/_layouts/xxxx/xxxxxss.aspx",
            title: "xxx xxx",
            width: 700,
            height: 950,
            dialogReturnValueCallback: myDialogCallback,
            args: JSON.stringify(data)
        };
        
        SP.UI.ModalDialog.showModalDialog(options);
        return false;
    }





我有一个单击按钮的代码,并且模式在firefox和ie中打开正常。但它不会在Chrome中打开。在控制台中给出以下错误:

未捕获TypeError:对象#<对象>没有方法'showModalDialog'..



任何人都可以帮我这个...

提前谢谢..



i have this code for a button click and the modal opens fine in firefox and ie. But it doesn't open in Chrome. gives the following error in console:
Uncaught TypeError:Object #<Object> has no method 'showModalDialog'..

Can anybody help me on this...
Thanks in advance..

推荐答案

触发调用Javascript方法的页面 showModalDialog 未包含对包含Javascript的.JS文件的引用。因此,您必须检查该页面并包含对.JS文件的引用。
You page that trigger the invocation of your Javascript method showModalDialog did not included the reference to .JS file that contains your Javascript. So you have to check that page and to include a reference to your .JS file.


嘿,我从Stackoverflow找到了解决方案。



http://stackoverflow.com/questions/22682332/sharepoint -object-has-no-method-showmodaldialog-in-chrome [ ^ ]
Hey i found the solution from Stackoverflow.

http://stackoverflow.com/questions/22682332/sharepoint-object-has-no-method-showmodaldialog-in-chrome[^]


这篇关于对象#在chrome中没有方法'showModalDialog'。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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