opening pdf on same server

Explorer ,
Jun 29, 2020

Copy link to clipboard

Copied

I am trying to open a pdf from within captivate in a pop up window using javascript:

window.open("https://www.xyz.co.uk/captivate/pdffiles/information.pdf","certificate","height=700,width=1024,left=...");

This works fine as a local desktop copy however, when I run this on the server it trys to open a window like this 

 https://www.xyz.co.uk/www.xyz.co.uk/captivate/pdffiles/information.pdf

which obvioulsy fails using the same code with a dummy pdf from a test site works fine on both local copy and server copy

window.open("https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf","certificate","height=700,width=1024,left=25,top=25");

 

Any help apreciated

 

Bernie

 

PS: If a captivate developer rreads this............any chance of getting a bigger window to enter code into

 

 

 

 

Views

75

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Explorer , Jun 29, 2020
Bernie_Gale Explorer , Jun 29, 2020
Ok, if anyone else gets stuck:window.open(' ../pdffiles/information.pdf', 'mywindow', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no,width=600,height=550'); Works. sometimes these things get so frustating when desktop works fine but server runs differently 

Likes

Translate

Translate
Jump to answer Jump to answer
Explorer ,
Jun 29, 2020

Copy link to clipboard

Copied

Ok,

 

if anyone else gets stuck:

window.open(' ../pdffiles/information.pdf', 'mywindow', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=no,width=600,height=550');

 

Works. sometimes these things get so frustating when desktop works fine but server runs differently

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
kdmemory LATEST
Advocate ,
Jun 29, 2020

Copy link to clipboard

Copied

Hi Bernie,

window.open() is soo 2002, if you get my drift. Before you go down that slippery slope, make sure that you read first what the MDN (Mozilla Developer Network) writes about Usablility Issues regarding opening secundary browser windows via Javascript.

Your PS about a bigger (and better) Javascript window, I couldn't agree more!

Klaus

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more