×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

PowerPlay Entreprise Server

How to always "Export to PDF" in a New Window by Draoued
Posted: 30 Sep 04

This is valid for PPES7.1

It's possible to change the JavaScript in order to export to PDF in a new window.

In the Gateway server
Folder: \cer3\webcontent\ppwb
File to be modified: ppwbpdfpagesettings.js

Make a backup copy of this file to keep the original file.

Edit ppwbpdfpagesettings.js and search for the function submitExportDialog().

Function looks like this:

function submitExportDialog()
{
//get current values of pdf options
var orientation = document.pdfForm.portrait.checked;
if(orientation != undefined)
...
...
...
if ( !target._fhchanged )
{
target._fhchanged = true;
target._fhtarget = fh.target;
target._fhaction = fh.action;
target._fhRA = fh.RA.value;
}
fh.action += "?MIME=.PDF";
target.doit(command);
return;
}


Add the following blue lines so that the function looks like:

function submitExportDialog()
{
//get current values of pdf options
var orientation = document.pdfForm.portrait.checked;
if(orientation != undefined)
...
...
...
if ( !target._fhchanged )
{
target._fhchanged = true;
target._fhtarget = fh.target;
target._fhaction = fh.action;
target._fhRA = fh.RA.value;
}
CurrentValuefhtarget = target._fhtarget; // Saving target window
CurrentValueTarget = fh.target; // Saving target window
target._fhtarget = "_blank" ; // Changing target
fh.target = "_blank" ; // Changing target

fh.action += "?MIME=.PDF";
target.doit(command);
target._fhtarget = CurrentValuefhtarget; // reset Target window
fh.target = CurrentValueTarget ; // reset Target window

return;
}

Code explanations:
The first 2 added lines are storing the target window value in new variables.

Then _fhtarget and fh.target value are changed to _blank.
_blank is a key word for Internet explorer, so it always opens a new window.

Then after the "Export to PDF" command is sent, the target window variables are resetted to what they were.
If the target window variables are not resetted, any action in the "Export to PDF" Frame creates a new window.

Both variables target._fhtarget and fh.target need to be changed because of Dynamic and Enhanced layouts.

Back to Cognos solutions FAQ Index
Back to Cognos solutions Forum


My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close