Replace current page with ajax content

前端 未结 9 1278
南旧
南旧 2020-12-05 04:50

I have a page with a dialog window which sends ajax post data to server and receives a response. During development, there can be two responses - one regular (this is not th

9条回答
  •  旧时难觅i
    2020-12-05 05:28

    I found this solution. I don't know if it si correct, but for Opera and Firefox it is working.

    var error_win = window.open(
       '',
       'Server error',
       'status=0,scrollbars=1, location=0'
    );
    error_win.document.write(XMLHttpRequest.responseText);
    

提交回复
热议问题