tags:

views:

32

answers:

0

This is the Code I am using:

document.open() returns null when we pass view from a jquery ajax call ("replace" )

var currentDoc = document.open("text/html", "replace");
currentDoc.write(result); currentDoc.close();

please share the best alternative..

Update:

$.ajax({
        url: '../controller/action/',
        type: 'POST',
        timeout: 500000,
        data: serFrm,
        cache: false,
        error: function() { $('[ID=divDisplayErrors]').css("display", "block"); $('[ID=resultDesc]').text("Error"); },
        complete: function() { displayBackgroundOverlay(false); },
        success: function(result) {
            var currentDoc = document.open("text/html", "replace");
            currentDoc.write(result); currentDoc.close();
            }
    });