我有这个简单的隐藏表单,其目的是在按钮点击时将响应重定向到新窗口。它在Internet Explorer 9和chrome中运行良好,但在弹出窗口打开时,在 firefox 11 中给出了警告消息。
错误消息
表格无法提交。最可能的原因是上传字段中的值无效。
虽然我不想上传任何文件。
DynamicForm代码
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
);
如何摆脱此警告讯息? (如果我向弹出窗口阻止程序添加一个例外,它会重定向而不显示任何警告消息)
请帮忙。三江源
答案 0 :(得分:1)
我通过在onLoad
函数
// Override DynamicForm formSubmitFailed function to disable warning alert in Firefox v11 when popups are blocked
this.formSubmitFailed = function(){}
您甚至可以查看SmartClient文档以获取更多信息。