Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window.print() problem with a twist 1

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Guys,

Let me set the scene. I have a forms page which has a rather comprehensive JavaScript function in the <HEAD></HEAD> section. When the user selects options from various drop down lists and click a button a Javascript function is called which uses the form input and local arrays to generate the HTML code for another page and uses document.write to ouput this page to the browser. Part of this HTML is a print button which the user can click to print out the page. However, when I click on the print button, it prints the original form page and not the page that I have just outputted using document.write.

Any suggestions as to how I can resolve this problem? Mise Le Meas,

Mighty :)
 
Make sure you use document.close() after you finish writing the data to the new page ;-)
b2 - benbiddington@surf4nix.com
 
Bangers,

Cheers - that worked a treat Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top