How to open the PDF file using AJAX
I tried this
$.ajax({
type : 'GET',
url : ApplicationParameters.getWebRoot() + 'E_Books/pdf/previews/' + jsonRecord[0].previewUrl,
data : strJsonParam,
dataType : 'text',
contentType : 'application/pdf',
success: function(data){
var opn = open("/E_Books/pdf/previews/"+jsonRecord[0].previewUrl);
displayBook(opn);
ebookStore.add(opn);
ebookStore.sync();
}
...
it open pdf file but I want open that in same window.it open in another window.
help please
Replace your code with this: