faqts : Computers : Programming : Languages : JavaScript : Links

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 20 people (85%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How do I give the ability to print all the documents in my website in one shot?

Aug 29th, 2000 10:11
Martin Honnen, Raj,


You cannot really do that with client side JavaScript. One attempt to 
print all linked documents would be to open up a window for every link 
and print the window:
  var wins = new Array(document.links.length);
  for (var i = 0; i < document.links.length; i++) {
    wins[i] = open(document.links[i]);
    setTimeout('wins[' + i + '].print()', 2000);
  }