TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shahbaz Kaware
NA
535
31.5k
How to open PDF in new window using jquery ajax with wcf
Jan 13 2020 5:23 AM
function DownloadPDF(DocName, DocNo, callbackwc) {
debugger;
var D3 = sessionStorage.getItem("logInUserIdADNIC");
var D4 = sessionStorage.getItem('logInUserSessionADNIC');
if ((DocNo || '') == '') {
parent.alertify.alert("Invalid document");
return;
}
var D1 = 'viewProvDoc';
var inputs = 'ViewPDF?D1=' + D1 + '&D2=' + DocNo + '&D3=' + D3 + '&D4=' + D4; + '"}';
callbackwc = callbackwc || function () { };
$.ajax({
type: "POST",
url: serviceUrl + inputs,
data: JSON.stringify(inputs),
success: function (data, textStatus, jqXHR) {
var ws = window.open("data:application/pdf" + data, "width=800,height=600,location=no,menubar=no,status=no,titilebar=no,resizable=yes")
//// var pdfWin = window.open("data:application/pdf;base64, " + data, '', 'height=650,width=840');
//// some actions with this win, example print...
return callbackwc();
},
error: function (jqXHR) {
//showError("...");
alert('Errror!!!');
}
});
}
The above is my jquery aajax code how do i open a PDF in new window plz help.
Reply
Answers (
1
)
how can i get bootstrap version logically?
Feed back from Condition (When select drop-down value)