Answer the question
In order to leave comments, you need to log in
How to trigger Print Preview in Internet Explorer 10+ for an iframe in a document?
Tell me please.
There is an html document in it there is an iframe into which the contents of html format files that were created from ms excel are loaded.
When calling the dialog in IE10+ "Print Preview" only the first page is displayed for printing. Other pages cannot be printed because the content is in the Iframe of the parent document.
If you click the print button on the "Parameters" tab, then the range of "Print Frames" radioboxes is inactive at all.
If you call Print Preview for IE using the method described below for the main document, then the window is called normally, but when you click the "Print" button, the "Parameters" tab, the range of "Print Frames" radioboxes is inactive.
var OLECMDID = 7;
* 7 - print preview
* 1 - open window
* 4 - Save As
*/
var PROMPT = 1; // 2 DONTPROMPTUSER
var WebBrowser = '';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = "";
I try to call for an iframe in an IE document like this, nothing happens. Error
var OLECMDID = 7;
var PROMPT = 1;
var WebBrowser = '';
document.getElementById('RF').contentWindow.document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = "";
If you just call the print dialog in IE in the way described below,
When you open the "Print" dialog, "Options" tab, the range of "Print Frames" radioboxes is active for selection.
The entire contents of the iframe are printed.
var target = document.getElementById('RF');
try {
target.contentWindow.document.execCommand('print', false, null);
} catch(e) {
target.contentWindow.print();
}
But I don't need this method, because it brings up a long print dialog box. I definitely need a "Print Preview" dialog with a printout of the entire contents of the iframe.
Help out...
Answer the question
In order to leave comments, you need to log in
The line with which the RewriteRule works does not start with /
https://habr.com/company/sprinthost/blog/129560/
RewriteEngine on
RewriteBase /
Options All -Indexes
RewriteRule ^dist/(.*)$ site/src/dist/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ site/src/index.html [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question