472,810 Members | 4,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,810 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 10245
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

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

Similar topics

7
by: Nick | last post by:
I've a main html file which will pop up a window with a image. In the main Window, I have the following code: w = window.open('popup.html') alert(w.document.images.length) And the alert shows...
2
by: David | last post by:
Hello, When the user starts my .aspx page and then opens a new browser window (i.e. through menu or Ctrl + N hotkey) I don't want both pages to share the same Session (HttpApplication.Session)....
0
by: Brian Rupert | last post by:
I'm running windows XP Pro SP2 with Visual Studio .net 2003. When I try to debug my ASP.net app, it goes into debug mode, but when I select Break All, I get this error message: Unable to break...
0
by: the_kiddie98 | last post by:
Hi, I have a C# project which handles web requests to a server. On my local machine, I can usually attach to aspnet_wp once and debug file (hitting breakpoints), however if I stop and want to...
7
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which...
2
by: John Derry | last post by:
I'm having a curious problem. I open a window with window.open method and supply a url which is a local file of file:/// form. After that, I go into the document of this new window to read the DOM...
18
by: Csaba Gabor | last post by:
Is there a straightforward way of implementing a PHP equivalent to window.setTimeout? In a javascript web app, it's often the case that things are done on an event driven basis. For example,...
3
by: Neekos | last post by:
I'm programatically opening IE and i need my code to wait until the browser is finished loading before continuing. How do i make it wait? i tried: Do DoEvents Loop Until webBrowser1.Busy =...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.