Java script for opening a pdf in a new window.

I am using the following script to open a .pdf in a browser window from a button in Lectora. When the button is selected, the following java script runs:

var win = window.open("CourseLinks.pdf",'winDocPopup','scrollbars=1,resizable=1,width=800,height=600')


I need learners to open two pdf and compare them. Having them open in separate browser windows or tabs seems like a good solution to me.

Is there any way to update this script to make that happen?


Here is what I tried (It worked a couple of times then stopped working.):

var win = window.open("CourseLinks.pdf",'winDocPopup_blank','scrollbars=1,resizable=1,width=800,height=600')


Any suggestion/solution would be greatly appreciated.

Discussion (1)

I would Insert the document as an "Attachment" and use the "Go to Web Adress" action to open it. Enter the filename as the adresss, select "Open in: New window" and enter a unique Window name in the New window properties.