to print or not to print.
I have a bit of a task... Hope some one can help. I will first try to explain the situation then post what i have so far as code.
We have a set of about 150 graph pages all the graphs are pulled into the pages via iframes *you can start laughing now* I didnt create this i just have to put a bandaid on it.
We have a print button which is set to print the iframe and it works fantasticly.... Aslong as theres only 1 iframe to print. Asoon as theres 2 or more it errors. Does not print anything.
They would preffer NOT to touch all 150 pages. to fix this. The print button is in an include so aslong as i change the print button and not the pages we wont have to touch all 150 pages.
One idea was to incapsulate the iframes in an iframe so it would print everything in that iframe WHICH does work but would take 150 extra pages to do so. <-- would rather not do this.
is there a way to make the print button print all iframes? without having to touch all the pages? heres an example of the code we have so far.
<pre>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:offic
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>EOC Client Vantage Reports - Today</title>
<link rel="stylesheet" type="text/css" href="/eoc/e_intranet.css">
</head>
<body>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<!-- include main navigation bar here... -->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;
function isWhitespace (s)
{
var i;
var whitespace = " \t\n\r";
if ((s == null) || (s.length == 0)) return true;
for (i=0; i<s.length; i++)
{
var c = s.charAt(i);
if (whitespace.indexOf(c) == -1) return false;
}
return true;
}
function submitSearchForm()
{
if ( isWhitespace(document.QueryForm.all.Sear
{
alert("Please, submit a keyword to search");
}
else
{
document.QueryForm.submit();
}
}
function openWindow(sPage, sWidth, sHeight)
{
var windowTop = 10;
var windowLeft = 20 ;
window.open(sPage, "password", "fullscreen=no,toolbar=no,status=no,menu
}
function Init()
{
QueryForm.SearchString.focus();
}
function msieversion()
{
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE");
if (msie>0)
return parseInt(ua.substring(msie+5, ua.indexOf(".", msie)));
else
return 0;
}
function NAF(szUrl, szQuery)
{
if (msieversion() >= 5)
window.external.NavigateAndFind(szUrl, szQuery, "_main");
else
window.navigate(szUrl, target="_main");
}
function fPrintFrame()
{
if (CheckIsIE() == true)
{
document.report.focus();
document.report.print();
}
else
{
window.frames['report'].focus();
window.frames['report'].print();
}
}
function CheckIsIE()
{
if (navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER')
{
return true;
}
else
{
return false;
}
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="/eoc/scripts/HM_Loader.js" TYPE='text/javascript'></SCRIPT>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<table border="0" cellspacing="0" cellpadding="0" height="0" width="100%">
<tr>
<td colspan="3" bgcolor="#3399CC">
<a href="/default.asp">
<img border="0" src="../images/minelogo_333399.gif" align="absmiddle" hspace="2" vspace="2" alt="Click here to return to the mine Intranet Home Page..." width="93" height="89"></a><font color="#FFFFFF">
<font size="6"><b>In House - Enterprise Operations Center</b></font></font>
</td>
<td bgcolor="#3399CC" valign="bottom" align="right">
<button onclick="fPrintFrame();" style="font-family: Arial; font-size: 8pt; font-weight: bold; color: blue;">
Print</button></td>
</tr>
<!-- <form NAME="QueryForm" ACTION="/search/search.asp" METHOD="POST"> -->
<tr>
<td class="bmenu" width="200"> </td>
<td nowrap class="bmenu" width="150"> <a href="javascript:void(0)" onMouseOver="popUp('HM_Menu1',event)" onMouseOut="popDown('HM_Menu1')" onClick="return false" class="bmenu">ClientVantage Reporting</a></td>
<!-- <td nowrap class="bmenu" width="110"> <a href="javascript:void(0)" onMouseOver="popUp('HM_Menu2',event)" onMouseOut="popDown('HM_Menu2')" onClick="return false" class="bmenu">ControlM</a></td>
<td nowrap class="bmenu" width="120"> <a href="javascript:void(0)" onMouseOver="popUp('HM_Menu3',event)" onMouseOut="popDown('HM_Menu3')" onClick="return false" class="bmenu">Control-M</a></td>
<td nowrap class="bmenu" width="200"> <a href="javascript:void(0)" onMouseOver="popUp('HM_Menu4',event)" onMouseOut="popDown('HM_Menu4')" onClick="return false" class="bmenu">Network Performance</a></td> -->
<td nowrap class="bmenu" width="100"> </td>
<td nowrap class="bmenu" colspan="2">
<p align="right"> <a href="javascript:void(0)" onMouseOver="popUp('HM_Menu2',event)" onMouseOut="popDown('HM_Menu2')" onClick="return false" class="bmenu">EOC Reporting</a></td>
<!-- <td class="bmenu"> Search </t
<td nowrap align="left" width="100%" bgcolor="#333399">
<input TYPE="TEXT" NAME="SearchString" SIZE="30" MAXLENGTH="100" VALUE="" TABINDEX="1" style="height:20px;">
<button TYPE="button" NAME="Action" onclick="submitSearchForm();" style="height:20px;">Go</button>
</td> -->
</tr>
</form>
</tr>
<tr height="100%">
<td valign="top" width="97">
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
</script>
<body onload="dynAnimation()" language="Javascript1.2">
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP5'
<img border="0" src="/eoc/images/sph_up.bmp" id="fpAnimswapImgFP5" name="fpAnimswapImgFP5" dynamicanimation="fpAnimswapImgFP5" lowsrc="/eoc/images/sph_dn.bmp" ></a><br>
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP9'
<img border="0" src="/eoc/images/spadp_up.bmp" id="fpAnimswapImgFP9" name="fpAnimswapImgFP9" dynamicanimation="fpAnimswapImgFP9" lowsrc="/eoc/images/spadp_dn.gif"></a><b
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP1'
<img border="0" src="/eoc/images/wh_up.bmp" id="fpAnimswapImgFP1" name="fpAnimswapImgFP1" dynamicanimation="fpAnimswapImgFP1" lowsrc="/eoc/images/wh_dn.bmp"></a><br>
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP4'
<img border="0" src="/eoc/images/wadp_up.bmp" id="fpAnimswapImgFP4" name="fpAnimswapImgFP4" dynamicanimation="fpAnimswapImgFP4" lowsrc="/eoc/images/wadp_dn.bmp"></a><br>
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP6'
<img border="0" src="/eoc/images/rh_up.bmp" id="fpAnimswapImgFP6" name="fpAnimswapImgFP6" dynamicanimation="fpAnimswapImgFP6" lowsrc="/eoc/images/rh_dn.bmp"></a><br>
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP8'
<img border="0" src="/eoc/images/radp_up.bmp" id="fpAnimswapImgFP8" name="fpAnimswapImgFP8" dynamicanimation="fpAnimswapImgFP8" lowsrc="/eoc/images/radp_dn.bmp" ><br></a>
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP7'
<img border="0" src="/eoc/images/7i_up.gif" id="fpAnimswapImgFP7" name="fpAnimswapImgFP7" dynamicanimation="fpAnimswapImgFP7" lowsrc="/eoc/images/7i_dn.bmp"><br></a>
<img border="0" height="3" src="/eoc/images/spacer.gif"><br>
<a onmouseover="document['fpAnimswapImgFP3'
<img border="0" src="/eoc/images/eoc_up.bmp" id="fpAnimswapImgFP3" name="fpAnimswapImgFP3" dynamicanimation="fpAnimswapImgFP3" lowsrc="/eoc/images/eoc_dn.bmp" ></a><br>
</td>
<td width="100%" height="100%" bordercolor="#0000FF">
<iframe src="/eoc/cvreports/today_title.htm" align="center" style="width:100%;height:100%;" marginwidth="1" marginheight="1" name="report" border="0" frameborder="0"></iframe>
</td>
</tr>
</table>
</body>
</html>
</pre>
