$.blockUI() makes anonymous call to ajax method in IE 9

71 Views Asked by At
function getData(cardNumber) {
    var path = g_contextPath + '/test/demo/searchdata';
    var vData = {"cardNumber":cardNumber}; 
    $.blockUI();
    $.ajax({
        type: 'GET',
        url : path,
        data : vData,
        cache : false,
        dataType : "json",
        async : true,
        success : function(output) {
            console.log("No data found for the card number : " + output);
            $.unblockUI();
        },
        error : function(jqXHR, textStatus,  errorThrown ){
            alert(errorThrown);
            $.unblockUI();**`strong text`**
        }
    });
}

While calling above function works absolutely fine in chrome, but when test in Internet Explorer 9, its called twice one expected and other anonymous call. My eclipse console showing following error:

ERROR [org.apache.struts2.dispatcher.Dispatcher] (http-/0.0.0.0:8080-8) Exception occurred during processing request: There is no Action mapped for namespace [/test/demo] and action name [undefined] associated with context path [/myapp].: There is no Action mapped for namespace [/test/demo] and action name [undefined] associated with context path [/myapp]. - [unknown location].

When I comment $.blockUI(); then I don't get any error in my eclipse console.

For other requirements i have used following js Using jQuery blockUI plugin V2.53, jQuery JavaScript Library V1.8.2, jquery-ui-1.9.1.custom.js,jquery.dataTables.js,

And java backend using Struts 2

I have also added $j = jQuery.noConflict(); in jquery(document).ready(function(){}); Otherwise $.blockUI isn't working.

1

There are 1 best solutions below

0
Another coder On

Switched to latest version(Version 2.70.0) of JqueryBlockui.js solved my problem