0

I have a problem with displaying modal window of .pdf files in a HTML WebPart.

I have HTML WebPart where I've placed a button (which invokes popup modal window, a file upload, for example) and a pdf in "object" tags (or "iframe", result is the same). When I push the button it looks like this:

Screenshot

But I need the pdf to be on background (i.e. under blue shading). I've already tried to set "wmode" to "transparent" and "opaque" - result is still the same...

How can I make it work properly?

UPD: My HTML is:

<input type="button" value="Open modal" onclick="javascript:NewItem2(event, &quot;http://mysite/_layouts/Upload.aspx?List={C9DE9F83-B870-448D-BFCE-622786815E4F}&amp;RootFolder=&quot;);javascript:return false;" "/>
<br/>
<div style="z-index:0;width:500px;height:650px">
  <object type="application/pdf" data="http://mysite/file.pdf" width="100%" height="100%">
    <param name="wmode" value="transparent"></param>
  </object>
</div>

UPD2: Maybe there were some errors in code, so I've created new page, added new HTML WebPart and added the same code. Now I cannot view my pdf until I remove <param> tag ("transparent" or "opaque"), but even if I do it I can see the major problem still presents. Here is my partial DOM, if needed (but I think it looks usually):

<tr>
<td class="" valign="top">
<div WebPartID="c465477d-1905-4e05-844a-9ec7140b16b5" HasPers="false" id="WebPartWPQ2" width="100%" class="ms-WPBody ms-wpContentDivSpace" allowDelete="false" style="" >
<input type="button" value="Open modal" onclick="javascript:NewItem2(event, &quot;http://mysite/_layouts/Upload.aspx?List={C9DE9F83-B870-448D-BFCE-622786815E4F}&amp;RootFolder=&quot;);javascript:return false;"/>
<br/>
<div style="z-index:0;width:500px;height:650px">
<object type="application/pdf" data="http://mysite/file.pdf" width="100%" height="100%">
</object>

  • can you add some DOM? – Salvatore Di Fazio Apr 10 '14 at 7:49
  • sorry, what do you mean? I've added my html code... – Alex Apr 10 '14 at 8:23
  • the DOM is the current HTML rendered by the browser – Salvatore Di Fazio Apr 10 '14 at 8:24
  • I've added it partially, unfortunately I cannot add the whole DOM due to company restrictions. – Alex Apr 10 '14 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.