473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 10431
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 =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.