I have a couple of preview related queries. I assume this this is the
correct newsgroup?
a) if an iframe is used to display a document which then enters preview mode
the default frame style is over-ridden. In the example below the scrollbars
are suppresssed.
<iframe id="content" flex="1" style="overflow:-moz-scrollbars-none"
type="content-primary" src=".." />
The content is initially displayed without scrollbars but when preview
mode is invoked the scrollbars are restored. Trying to reset the property
doesnt seem to work either.
document.getElementById('content').setAttribute('style',"overflow:-moz-scrol
lbars-none")
b) while either iframe and browser tags both allow a document to be
displayed in preview mode, any attempt to return to content mode via the
exitPrintPreview() function
generates a page fault error - this problem doesnt arise when using
tabbrowser.
so does anyone know if iframe and browser can be used instead of tabbrowser
and if so what additional code is is needed?
// *******************************************************************
var state=1
function toggle()
{
state=state*-1
if (state<0)
{
previewprint()
}
else
{
contentprint()
}
}
function previewprint()
{
gWebProgress = new Object();
var ifreq =
_content.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
var webBrowserPrint =
ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint);
gPrintSettings=null
webBrowserPrint.printPreview(gPrintSettings, null,
gWebProgress.value);
}
function contentprint()
{
// exit print preview galley mode in content area
var ifreq = _content.QueryInterface(
Components.interfaces.nsIInterfaceRequestor);
var webBrowserPrint = ifreq.getInterface(
Components.interfaces.nsIWebBrowserPrint);
webBrowserPrint.exitPrintPreview(); // page fault
}
]]>
</script>
<control id="toggle" onclick="toggle()"
style="height:200px;background:red"/>
<iframe type="content-primary" flex="1" src="........"/>
_______________________________________________
mozilla-layout mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-layout