首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在SmartClient中提交SmartClient时消除火狐警告消息?

如何在SmartClient中提交SmartClient时消除火狐警告消息?
EN

Stack Overflow用户
提问于 2013-05-15 06:19:29
回答 1查看 150关注 0票数 0

我有一个简单的隐藏表单,其目的是通过单击按钮将响应重定向到一个新窗口。它在Internet 9和chrome中工作得很好,但在Firefox11中,当弹出块打开时,它会给我一条警告信息。

错误消息

表格无法提交。造成这种情况的最可能原因是上载字段中的无效值。

虽然我没有试图上传任何文件的地方。

DynamicForm代码

代码语言:javascript
复制
dojo.provide("amk.geo.DomainCore.forms.SearchForm");

amk.geo.DomainCore.forms.SearchForm = function() {

    /**
     * Resource bundle.
     * @type Object
     */
    this.bundle = amk.geo.tools.bundles.Application;

    this.formID = null;

    this.controller = null;

    this.resBundle = amk.geo.app.framework.controller.AppController.getResourceBundle("amk.geo.DomainCore.Resources");

    this.initWidget = function() {
            this.Super("initWidget", arguments);
            this.formID = "SearchForm";
            var params = [        
                {type: "hidden", name: "EMAIL_ID" },
                {type: "hidden", name: "PORTAL_PSSWD"},
                {type: "hidden", name: "PROJECT_ID"},
                {type: "hidden", name: "fsquery"},
                {type: "hidden", name: "PRODUCT_VER"},
                {type: "hidden", name: "PRODUCT_NAME"},
                {type: "hidden", name: "ORIGIN"}             
            ];
            this.setItems(params);
            this.action = "https://xxxx.com/default.asp";
            this.method = "POST";
            this.target = "_blank";
            this.canSubmit = true;

    };

    this.onLoad = function(){
        this.submit();
    }
}
// define class
isc.ClassFactory.definePackageClass(
    "amk.geo.DomainCore.forms.SearchForm",    // class name
    isc.DynamicForm     // superclass
);

我怎样才能摆脱这条警告信息?(如果我向弹出窗口阻止程序添加了异常,它将在没有任何警告消息的情况下重定向)

请帮帮忙。谢谢你

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-05-15 10:57:57

我通过在onLoad函数之后添加下面的行来解决我的问题

代码语言:javascript
复制
// Override DynamicForm formSubmitFailed function to disable warning alert in Firefox v11 when popups are blocked
this.formSubmitFailed = function(){}

您甚至可以查看SmartClient文档以获得更多信息。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16558115

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档