1

Html code

<div class="casestudy">//$casestudyDocData=http://localhost/xxxx/case/interview_questionarie.pdf

<iframe src="<?php echo $casestudyDocData; ?>"  width="395" height="195"> </iframe> 

<a class="fancypdf" href="<?php echo $casestudyDocData; ?>" >Link to PDF </a> 

                

jquery code

$(".fancypdf").fancybox({
                'frameWidth': 680,
                'frameHeight':495,
                'overlayShow':true,
                'hideOnContentClick':false
});

I am using fancybox to display the pdf The requested content cannot be loaded.

Please try again later. But fancybox is not able to display the pdf? Can anyone find what is the mistake i have done ?

JFK
  • 40,963
  • 31
  • 133
  • 306
dude
  • 4,532
  • 8
  • 33
  • 51

1 Answers1

4

U should just use 'type':'iframe'

$(".fancypdf").fancybox({
                'frameWidth': 680,
                'frameHeight':495,
                'overlayShow':true,
                'hideOnContentClick':false,
                'type':'iframe'
});
Ghostman
  • 6,042
  • 9
  • 34
  • 53