• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

opening pdf on same server

Explorer ,
Jun 29, 2020 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

474

Translate

Translate

Report

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

correct answers 1 Correct answer

Explorer , Jun 29, 2020 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

 

Votes

Translate

Translate
Explorer ,
Jun 29, 2020 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

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources