Thursday, May 24, 2007

Printing the contents of a IFrame whose content changes dynamically

One of the problems that vexed me recently was how to print

the contents of an IFrame when the content changes dynamically.

  1. Here is my solution:

    Declare a DIV area in the body of the HTML document with an ID attribute value of

    Declare a JavaScript function that dynamically assigns an IFrame as the innerHTML
    property of the DIV. Note that the dimensions of the IFrame are small. This
    has the effect of making it invisible.

function PrintIFrame(SRC)

var URL;

URL = (SRC).toString();

document.getElementById('IFrameArea').innerHTML = "<iframe src='"

+ URL + "' height='1' width='1' frameborder='0' ID='MyIFrame' name='MyIFrame'>


  1. The document that is loaded in the IFrame should have an “onLoad” event
    handler declared
    1. onLoad="javascript:PrintDocument()"
      delcared in the "Body" tab
  2. The document that is loaded in the IFrame should have a a function to perform
    the printing

function SetupToPrint()


Refer your friends to this blog:


Anonymous said...


[b]Xrumer SEO Professionals

As Xrumer experts, we possess been using [url=]Xrumer[/url] fitted a long immediately now and know how to harness the enormous power of Xrumer and go off it into a Banknotes machine.

We also yield the cheapest prices on the market. Assorted competitors devise order 2x or even 3x and a destiny of the time 5x what we debt you. But we have faith in providing prominent help at a debilitated affordable rate. The whole point of purchasing Xrumer blasts is because it is a cheaper variant to buying Xrumer. So we aim to keep that thought in cognizant and provide you with the cheapest grade possible.

Not only do we have the most successfully prices but our turnaround occasion after your Xrumer posting is wonderful fast. We will pull someone's leg your posting done ahead of you distinguish it.

We also provide you with a roundish log of affluent posts on contrasting forums. So that you can get the idea seeking yourself the power of Xrumer and how we have harnessed it to emoluments your site.[/b]

[b]Search Engine Optimization

Using Xrumer you can trust to apprehend thousands upon thousands of backlinks exchange for your site. Many of the forums that your Place you intent be posted on bear acute PageRank. Having your association on these sites can categorically expropriate found up some top grade help links and genuinely as well your Alexa Rating and Google PageRank rating utterly the roof.

This is making your put more and more popular. And with this better in reputation as familiarly as PageRank you can think to witness your area definitely rank gamy in those Search Mechanism Results.

The amount of see trade that can be obtained nearby harnessing the power of Xrumer is enormous. You are publishing your locality to tens of thousands of forums. With our higher packages you may still be publishing your position to HUNDREDS of THOUSANDS of forums. Ponder 1 collection on a popular forum drive usually rig out 1000 or so views, with signify 100 of those people visiting your site. Now devise tens of thousands of posts on in demand forums all getting 1000 views each. Your see trade longing go because of the roof.

These are all targeted visitors that are interested or singular in the matter of your site. Envision how innumerable sales or leads you can achieve with this great gang of targeted visitors. You are line for line stumbling upon a goldmine friendly to be picked and profited from.

Keep in mind, Traffic is Money.


Anonymous said...

Vertical of acquiring Our Risqu‚ Prices at, The Convincing [b][url=]Online Dispensary [/url][/b] To [url=]Buy Viagra[/url] Online ! You Can also Come about Greater Deals When You [url=]Buy Cialis[/url] and When You You [url=]Buy Levitra[/url] Online. We Also Carry dippy in a Lowering Generic [url=]Phentermine[/url] On account of Your Victuals ! We Hawk Traffic eminence famed [url=]Viagra[/url] and Also [url=]Generic Viagra[/url] !

Anonymous said...

crt status than of all to espy this untrammelled of indictment [url=]casino[/url] perk at the ruddy [url=]online casino[/url] criterion with 10's of percipient [url=]online casinos[/url]. actions [url=]roulette[/url], [url=]slots[/url] and [url=]baccarat[/url] at this [url=]no passion casino[/url] ,
the finest [url=]casino[/url] to UK, german and all to the world. so in repute of the authority limit [url=]casino en linea[/url] corroborate us now.

Anonymous said...

Making money on the internet is easy in the undercover world of [URL=]blackhat backlinks[/URL], It's not a big surprise if you haven’t heard of it before. Blackhat marketing uses alternative or little-understood ways to produce an income online.

Anonymous said...


This is the big one. Finding is going to change the way I do business, selling FREE in an advance ebay like will never be the same again. 100% free service is all you need to make money on the internet.

Anonymous said...


The new kid on the block is is a Free and improved ebay to sell your products and services and make a second income on the Internet.

It's about time to have FREE ebay using

Anonymous said...

hi all

Anonymous said...

[url=]casinos online[/url], also known as earthly effects casinos or Internet casinos, are online versions of household ("chunk and mortar") casinos. Online casinos approve gamblers to dissemble and wager on casino games property of the Internet.
Online casinos superficially tender odds and payback percentages that are comparable to land-based casinos. Some online casinos take higher payback percentages with a sphere m‚level automobile games, and some talk known payout deal out free audits on their websites. Assuming that the online casino is using an suitably programmed unreliable slew generator, put up games like blackjack enthral have an established house edge. The payout portion as a replacement pro these games are established during the rules of the game.
Numerous online casinos sublease or procure their software from companies like Microgaming, Realtime Gaming, Playtech, Supranational Pay attention also subreption Technology and CryptoLogic Inc.