Thought about that and commented the below line but still same pop-up, and my log statement in the requestCompleteCallback does not print to console either
Original Message:
Sent: Tue April 08, 2025 12:16 PM
From: Nanda Pilaka
Subject: opening document to browser using Content Navigator Plugin
Is the response.url value valid?
The /getDocument called via bookmark.jsp does not have a value for response.
------------------------------
Nanda Pilaka
IBM Content Navigator Support
Original Message:
Sent: Tue April 08, 2025 11:04 AM
From: Kiran Aithagani
Subject: opening document to browser using Content Navigator Plugin
I have added a document context menu option in content navigator, using which I am invoking this java script from the Content Navigator search results. the objective is to call the /p8/getDocument and render the content in a new browser window, the function I am intending to make it work is only PDF.
using below code I am able to get the content and in the browser Dev Tools I can see a 200 code and binary pdf content in the response , however content navigator is giving me this pop-up instead of opening the new window and showing me the content, any idea what I am missing ?
lang.setObject("openInBrowser", function (repository, items, callback, teamspace, resultSet, parameterMap) {
console.log('new function to open the pdf in a new browser window');
var requestParams = {
template_name: "DC_IndClass",
docid: "DC_IndClass,{FFC7F9F8-558C-45EE-9762-78D8A92A6A6D},{30A20196-0000-C216-9FEC-2BDDEB50F377}",
repositoryId: repository.id,
version: "released",
objectStoreName: "OS001",
vsId: "{30A20196-0000-C112-A939-A5870795D6DD}",
desktop: "default"
};
Request.invokeService('getDocument', 'p8', requestParams,lang.hitch(this, function(response) {
console.log(' content retrieval successful .');
//send the response content to a new window
window.open(response.url, "myNewWindow", "width=600,height=400");
}));



------------------------------
Kiran Aithagani
------------------------------