can somebody help me with this... i need a javacript code to print multiple documents when a print button is pressed. I posted 20 documents on my site and i just wanted to have a print button underneath the links of all the documents so the viewers can just print all the documents in a press of a button. I just dont want them to open those documents and print them one by one. Coz all the documents are basically have to be printed anyway. Thanks a lot!!!
i have this code but this code opens up a dialog box for each new window and is annoying. i just need one print dialog box for ALL the pages
function print(url,name)
{
var win=window.open(url,name,"width=100,height=100");
win.opener.focus()
win.print();
}
function printAll()
{
print("about:blank","win1") \\about blank is a sample url
print("about:blank","win2")
print("about:blank","win3")
print("about:blank","win4")
print("about:blank","win5")
print("about:blank","win6")
print("about:blank","win7")
print("about:blank","win8")
}
<form>
<input name="Print" onClick="printAll(); return false" type="button" value="Print">
</form>