471,082 Members | 904 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,082 software developers and data experts.

Forcing window.print() to wait until all iframes have finished loading

5
hi guys.... how i would now that the iframe loading of chart fx graph is completed...

i used a window.print on page load with multiple iframes on the same page....

what happen is once the print option appears and print it... some of my pages are not yet completed loading the chart fx.... any help?
Aug 29 '07 #1
6 9903
Death Slaught
1,137 1GB
hi guys.... how i would now that the iframe loading of chart fx graph is completed...

i used a window.print on page load with multiple iframes on the same page....

what happen is once the print option appears and print it... some of my pages are not yet completed loading the chart fx.... any help?
Hello Eraser, Welcome to TSDN

When you put the script in the head section of the document none of your functions can/will be called until the page has finished loading, but by puting it in your body section your page may not completely load.

I have no idea if thats your problem, but if you post your code we will be able to help your more.

- Death

PS - please make sure to wrap your code (to do this just highlight the code and click either the # sign for code the <> sign for HTML or the paper that says PHP for PHP)
Aug 29 '07 #2
pbmods
5,821 Expert 4TB
Heya, Eraser. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Aug 29 '07 #3
Eraser
5
Heya, Eraser. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

hello Heya....got it! Thank you very much...:)
Aug 29 '07 #4
Eraser
5
Hi Death...thank you very much...please see my code below..i used placeholder controls to add string like list of pages with 1 iframe each page... its a dynamic so its defends on data how many pages will be printed... inside that iframe on source attribute, im calling a page and that page is displaying chart fx graph..... any idea?
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ReHeatFurnacePrintAll.aspx.cs" Inherits="LongProducts_Reports_ReHeatFurnacePrintAll" Title="Untitled Page" %>
  2. <%@ Register Src="ControlPrintAllTemplate.ascx" TagName="ControlPrintAllTemplate" TagPrefix="uc1" %>
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head>
  5.     <link href="../../stylesheet.css" rel="stylesheet" type="text/css" />
  6.     <script type="text/javascript" language="javascript">
  7.         function PrintMe()
  8.         {
  9.            document.getElementById('divLoading').style.display = 'none';
  10.             window.print();
  11.             window.close();
  12.         } 
  13.     </script>
  14. </head>
  15. <body onload="javascript:PrintMe()">
  16.     <form id="form1" runat="server">
  17.         <div id="divLoading" style="width:100%; display: inline; height: 200px; vertical-align: top; font-weight: bold; text-align: center; font-size: 12px;">  
  18.                  <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/ajax_loader3.gif" /> Printing is in progress, please wait...     
  19.         </div>
  20.         <div id="div2" style="width:100%;">
  21.               <asp:PlaceHolder id="phControls" runat="server"></asp:PlaceHolder>                        
  22.         </div>
  23.     </form>
  24. </body>
  25. </html>
  26.  

Hello Eraser, Welcome to TSDN

When you put the script in the head section of the document none of your functions can/will be called until the page has finished loading, but by puting it in your body section your page may not completely load.

I have no idea if thats your problem, but if you post your code we will be able to help your more.

- Death

PS - please make sure to wrap your code (to do this just highlight the code and click either the # sign for code the <> sign for HTML or the paper that says PHP for PHP)
Aug 29 '07 #5
pbmods
5,821 Expert 4TB
Heya, Eraser.

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.
Aug 29 '07 #6
acoder
16,027 Expert Mod 8TB
Do you have control over the contents of the iframes?
Aug 30 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Nick | last post: by
2 posts views Thread by David | last post: by
reply views Thread by the_kiddie98 | last post: by
2 posts views Thread by John Derry | last post: by
18 posts views Thread by Csaba Gabor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.