Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to get rid of firefox warning message while submitting a DynamicForm in SmartClie

    I have this simple hidden form whose purpose is to redirect the response to a new window on a button click. It works perfect in Internet Explorer 9 and chrome but gives me a warning message in firefox 11 when popup block is on.

    Error Message

    Form was unable to be submitted. The most likely cause for this is an invalid value in an upload field.

    while I am no where trying to upload any files.

    DynamicForm code

    Code:
    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
    );
    How can I get rid of this warning message? (If I add an exception to the popup blocker, it redirects without any warning message)
    Attached Files
    Last edited by abhisheksimion; 14 May 2013, 23:01. Reason: code

    #2
    worked

    I got a solution to my problem by adding the below lines after onLoad function

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

    Comment

    Working...
    X