2011-05-13 7 views
0

나는 간단한 설정이 http://denishoctor.me/readertest.html (아래 코드도 있음)입니다. 이 버튼은 삽입 된 pdf에 대한 대화 상자를 엽니 다. 이것은 IE6/7/8을 제외한 모든면에서 문제가 없습니다.내 jQuery UI 대화 상자를 통해 IE7/8에 어도비 리더가 출혈하는 것을 어떻게 멈출 수 있습니까?

누구나 중지 방법을 알고 있습니까?

감사합니다, 데니스

<button type="button">Click Me</button> 

<iframe id="iFrameResponse" style="margin-left:250px;height:500px;width:100%" src="http://knowwheretheygo.org/media//static/content/sample.pdf"></iframe> 

<div id="InformationDialog" style="display: none;">This is my info</div> 

<script type="text/javascript"> 
    $(document).ready(function() { 
     $("#InformationDialog").dialog({ 
      title: "Information", 
      autoOpen: false, 
      hide: "slide", 
      show: "slide", 
      width: 225, 
      position: [100,125], 
      height: 400 
     }); 

     $("button").click(function() { 
     $("#InformationDialog").dialog('open'); return false; 
     }); 
    }); 
</script> 

업데이트 : http://groups.google.com/group/jquery-ui/browse_thread/thread/66c7d2d31feedea9?fwc=1을 발견했습니다.에 대해 이야기하는 사람. 언급 한 바와 같이 PDF를 위해 IE에서 작동하도록하기 위해 필요한 변경 사항을 아는 사람은 누구입니까?

+0

불행히도, 이것은 내가 고칠 수 있다고 생각하지 않습니다. 플러그인은 브라우저 외부에 있습니다 (Linux에서 플래시와 동일하게 작동합니다). – Blender

+0

대화 상자가 위에있을 때 PDF를 스크롤하는 동안 Safari에서도 잘못 렌더링됩니다. –

답변

1

물론 이것은 이상적은 아니지만 작동하며 다른 것을 본적이 없습니다. 또한 IE6/7/8에만이 작업을 수행하고 좋은 브라우저를 처벌하지 마십시오.

iFrame을 팝업 아래 및 PDF 위에 붙여야합니다. jQueryUI Dialog에서 끌기와 크기 조절을 끄면이 기능이 훌륭하게 작동합니다. 그들과 함께 켜져 있으면 내가 repaints 및 위치 가정으로 인해 약간의 flicking 것 같습니다.

예는 내 기술은 단순히/크기 조정은 iframe을 숨기는 것입니다 http://denishoctor.me/examples/iframepdf/test.html

1

@ 찾을 수 있습니다. Safari에서는 iframe의 크기를 조정해야합니다.

 $("#pdf").css("visibility", "hidden"); 
    if (navigator.userAgent.indexOf("Safari") > -1) { 
     $("#pdf").height("5px"); 
     } 
     $("#dialog-modal").dialog({ 
      height: 350, 
      width: 800, 
      buttons: [ 
      { 
       text: "Close", 
       click: function() { 
        $("#pdf").css("visibility", "visible"); 
         if (navigator.userAgent.indexOf("Safari") > -1) { 
          $("#pdf").height("500px"); 
         } 
       } 
      }], 

      close: function(event, ui) { 
       $("#pdf").css("visibility", "visible"); 
       if (navigator.userAgent.indexOf("Safari") > -1) { 
        $("#pdf").height("500px"); //whatever the height of your PDF iframe is 
       } 
      } 
});