How to write ajax responce in window popup

Js

Posted on 15 Jul 15 by Vickey
  594



We have many popup plugins and library for open a popup up with the dynamic content. but we can use widnow popup also, which is browser property. we can open our ajax responce in window popup

function openPopup(){

    $.ajax({
    
        type: "POST",
        url: "url here",
        success: function(response){
	  var win=window.open('about:blank','popup','width=600,height=200')
	  with(win.document)
	  {
	    open();
	    write(response);
	    close();
	  }
        }
    });
}

 


If this post help you reduce time to develop, you can help me to maintain this website :)
www.000webhost.com