Link in Grid to open .PDF in separate window

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
RichDotson
Profound User
Posts: 22
Joined: Fri Aug 06, 2010 1:40 pm
First Name: Rich
Last Name: Dotson
Company Name: Wheeling & Lake Erie Rail
State / Province: Ohio
Country: United States
Contact:

Link in Grid to open .PDF in separate window

Post by RichDotson »

I have an application that creates a .PDF of a report and saves it to a folder in the IFS. I am creating grid on the customer web page that will list all of the reports that were created by that specific user. I would like to have it where the customer can click on the desired report in the grid and the .PDF would open up in a separate window.

The names of the reports and their location in the IFS are stored in a database and this is the info that I am loading into the grid.

Is there a way to do this?
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: Link in Grid to open .PDF in separate window

Post by Alex »

Assuming the PDF folder is within the document root (/www/profoundui/htdocs/), you can use the grid's onrowclick event to pop the report open in a new window. The script would look like this:

window.open(get("PATH." + row));

Where PATH is the id of a field containing the url path to the PDF. Be sure to specify the id on the output field widget within the subfile (it is not the same as the bound field name). If you don’t have the path in a field that is displayed to the user, you can add it as a hidden field. Right-click the field and select hide to hide it.

I hope this helps.
RichDotson
Profound User
Posts: 22
Joined: Fri Aug 06, 2010 1:40 pm
First Name: Rich
Last Name: Dotson
Company Name: Wheeling & Lake Erie Rail
State / Province: Ohio
Country: United States
Contact:

Re: Link in Grid to open .PDF in separate window

Post by RichDotson »

This worked great. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest