0

I use < embed > tag to show pdf report in our web application.
To show next pdf report, I remove whole < embed > tag and add another < embed > tag with modified src attribute.
It is not possible just to modify src attribute of embed tag to show new pdf report. You should remove the old < embed > element and add new one to update pdf on the page.
It works fine.
But this approach does not work if user accesses web application via Remote Desktop Web Access.
In this case previously opened report displays briefly, when user open a new report.
Does anyone have any idea how to disable this blinking of old pdf report?
Is it bug in Remote Desktop Web Access?
Or I should remove/add embed elements using some other approach?

<!doctype html>
<html>
<body>
   <input type="button" id="openPDF1" value="Open PDF1"/>
   <input type="button" id="openPDF2" value="Open PDF2"/>
   <input type="button" id="removePDF" value="Remove PDF"/>

   <div id="pdfPlaceholder"></div>

   <script src="jquery-1.11.3.min.js"></script>
   <script>
      $( document ).ready(function() {
         $("#openPDF1" ).click(function() {
            $("#pdfPlaceholder" ).append("<embed id='pdf' src='doc1.pdf' type='application/pdf' style='width: 100%; height: 665px;' cache='false'/>");
         });

         $("#openPDF2").click(function() {
            $("#pdfPlaceholder").append("<embed id='pdf' src='doc2.pdf' type='application/pdf' style='width: 100%; height: 665px;' cache='false'/>");
         });

         $("#removePDF").click(function() {
            $("#pdf").remove();
         });
      });
   </script>
</body>
</html>
Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133

1 Answers1

0

It seems to me that previous report will not blink if to use object instead of embed.

Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133