【问题标题】:How to get rid of firefox warning message while submitting a DynamicForm in SmartClient?在 SmartClient 中提交 DynamicForm 时如何摆脱 firefox 警告消息?
【发布时间】:2013-05-15 06:19:29
【问题描述】:

我有一个简单的隐藏表单,其目的是在单击按钮时将响应重定向到新窗口。它在 Internet Explorer 9 和 chrome 中完美运行,但在 firefox 11 中打开 popup block 时会显示警告消息。

错误信息

无法提交表单。最可能的原因是上传字段中的值无效。

虽然我不在尝试上传任何文件的地方。

动态表单代码

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
);

我怎样才能摆脱这个警告信息? (如果我向弹出窗口阻止程序添加异常,它会重定向而没有任何警告消息)

请帮忙。谢谢你

【问题讨论】:

    标签: html internet-explorer firefox smartclient dynamicform


    【解决方案1】:

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

    // Override DynamicForm formSubmitFailed function to disable warning alert in Firefox v11 when popups are blocked
    this.formSubmitFailed = function(){}
    

    您甚至可以查看SmartClient 文档了解更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-21
      • 2015-02-02
      • 2020-12-16
      • 1970-01-01
      • 2022-11-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多