SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a print (preview)window, for which I want to load the core html from the site assets:

The code:'/SiteAssets/reportingPrintBase.html','_blank','width=1250,height=800,menubar=yes,scrollbars=yes,resizable=yes');   

The html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns:o="urn:schemas-microsoft-com:office:office" lang="en-us" dir="ltr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" type="text/css" href="/SiteAssets/reporting.css" />
<title>Untitled 1</title>
<div id="printHeader">Reporting</div>
<div id="printBody"></div>
<div id="printFooter">Reporting Footer</div>

The popup opens, but I'm then asked if want to download the file. This doesn't happen in a normal env. So I'm assuming it has something to do whith the way sharepoint sets headers..

So how can I get the popup window to simply render the html?

share|improve this question
up vote 1 down vote accepted

Maybe you could use the default sharepoint popup-method?

<a href="javascript:SP.UI.ModalDialog.OpenPopUpPage('/SiteAssets/reportingPrintBase.html');">Do something</a>

You can set these parameters:

SP.UI.ModalDialog.OpenPopUpPage(url, callback, width, height);


  • url: The URL of the page to be shown in the modal dialog.
  • callback: The callback function that runs when the modal dialog is closed.
  • width: The width of the modal dialog.
  • height: The height of the modal dialog.
share|improve this answer

Is the html set up correctly in IIS? Looks like a mime/ content-type related thingie.. If not.. Have you tried another Browser?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.