 |
| Javascript General Javascript discussions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 11th, 2005, 09:06 PM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to use Print Hidden Function
hi all,
good morning,
i have facing problem to use printhidden function in javascript.
i want my system allow me to print few of the pages by just click once print button. do you think is it possible ?
below is my code,
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<script type="text/javascript">
function printURL()
{
window.onprintcomplete = function() // set to handle completion
{
}
printHidden("testing.asp");
printHidden("testing1.asp");
}
</script>
Testing Print Hidden In Java Script
<form>
<input type="button" onclick="printURL()" value="Call function" >
</form>
</body>
</html>
* please help me have a look and share your knowledge with me :)
i'll very thankful to receive your reply..
have a nice day
bey
|
|

May 12th, 2005, 01:03 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
And where is the printHidden function defined?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

May 12th, 2005, 01:30 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi imar,
thank for your reply.
actually i not really know how to use the printhidden function.
so can you give me the idea to make the printhidden function can be run.
thanks a lots :)
bey
|
|

May 12th, 2005, 02:40 AM
|
|
Friend of Wrox
|
|
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi,
I have not seen any "printhidden" in javascript.
It seems that, its a custom funtion.
As Imar said find the funtion code.
Prashant
|
|

May 12th, 2005, 04:56 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi prashant & imar,
i get this code from my friend, so i not so sure about it....
anyway, thank you very much.
bey
|
|

May 12th, 2005, 09:00 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Quote:
quote:Originally posted by kiwibey
i get this code from my friend
|
Well ask him about it :)
window does not have an event "onprintcomplete" either, there is "onafterprint".
--
Joe ( Microsoft MVP - XML)
|
|

May 12th, 2005, 11:38 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You may want to try this:
http://Imar.Spaanjaars.Com/QuickDocId.aspx?QUICKDOC=243
It's an IE only solution, and it may not work due to security restrictions, but it's worth a try....
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |