Hi all,
I m stuck with this frame issue from last 2 days...
All i want is to do a print preview in my page for the top frame only..
We have 3 frames : Body, Messages,Recent
Our site is an intranet site and will only use MSIE
here is my code for print preview.
<script language=javascript>
function printpr()
{
alert(document.getElementById('Body').name);
var PROMPT = 1; var OLECMDID=7; // 2 DONTPROMPTUSER
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
//over here instead of previewing all the 3 frames i just want to preview only the body frame. //so is it possible to get the Body.InsertAjacentHTML in the frame or do so trick to just preview BODY frame only?
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = '';
}
Plz. Help
cheers
C
</SCRIPT>