tags:

views:

5

answers:

0

Hi everyone,

I have page 1 (P1) contains an iframe point to another page (P2). All javascript codes reside on P1.

After i "close" P2 in anyway, i want to refresh the current data on P1

For example: P1 contains a list of data, P2 is the edit page to let user edit any data. After P2 is closed, i want to reload the P1. But, the error is thrown while i send a ajax request.

This request ajax function work perfectly on page P1. It is called after paging, or sorting, etc. But in above case, this is not work.

function _sendRequestGridData() {
        //request data
        _setVisibleLoadingNotification(true);
        $.ajax({
            url: url,
            dataType: "json",
            type: "POST",
            data: _genRequestData(),
            beforeSend: function (xmlHttpRequest) {
                if (reloadFlag == true) {};
            }, 
            error: function(xmlHttpRequest, textStatus, errorThrown) {
                _setVisibleLoadingNotification(false);
                alert(xmlHttpRequest.readyStatus);
            },
            success: function (gridData) {
                _buildGrid(gridData, false);
                _setVisibleLoadingNotification(false);
            },
            complete: function() {
                //alert($);
            }
        });
    }

Any help, or any suggestion plz?