|
 |
asp_web_howto thread: Printing
Message #1 by "O'Hara, Elliott M" <EMOHARA@k...> on Wed, 21 Feb 2001 07:08:46 -0500
|
|
OK guys....
is there a way to Print only 1 cell from a table?
I'd preferr to it to work when they hit the print button on the browser, I
know there is a window.onbeforeprint and a window.onafterprint... it just
doesn't seem to do what I want??
Any Ideas?
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 21 Feb 2001 12:39:51 -0000
|
|
Nothing built in that does this
If you wanted them to use the normal print button (like you said), then you
could put divs around each bit you want to hide, and put onbeforeprint and
onafterprint event handlers that hide and show the divs.
<DIV onbeforeprint="style.display='none'"
onafterprint="style.display='block'">
</DIV>
(This will only work in IE)
Alternatively, you could have a print button on the page which uses DHTML to
hide everything else on the page, prints it, and then restores everything
else. Or you could create a new window, write the "innerHTML" of the cell
you want to print to it and print that window, then close it.
-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Wednesday, February 21, 2001 12:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Printing
OK guys....
is there a way to Print only 1 cell from a table?
I'd preferr to it to work when they hit the print button on the browser, I
know there is a window.onbeforeprint and a window.onafterprint... it just
doesn't seem to do what I want??
Any Ideas?
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Message #3 by "shivakumar mahalingam" <shivaulagam@h...> on Wed, 21 Feb 2001 18:19:07 +0530
|
|
hi,
You can't refer any table cell but if u keep ur table cell in a Div tag .
By refering the div id u can take the cell value
good luck
shiva
Message #4 by "O'Hara, Elliott M" <EMOHARA@k...> on Wed, 21 Feb 2001 08:12:12 -0500
|
|
if i use div's... and set the display to none, they still take up space
right?
I all the cells except one to go away or at least not take up any space....
-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Wednesday, February 21, 2001 7:40 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Printing
Nothing built in that does this
If you wanted them to use the normal print button (like you said), then you
could put divs around each bit you want to hide, and put onbeforeprint and
onafterprint event handlers that hide and show the divs.
<DIV onbeforeprint="style.display='none'"
onafterprint="style.display='block'">
</DIV>
(This will only work in IE)
Alternatively, you could have a print button on the page which uses DHTML to
hide everything else on the page, prints it, and then restores everything
else. Or you could create a new window, write the "innerHTML" of the cell
you want to print to it and print that window, then close it.
-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Wednesday, February 21, 2001 12:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Printing
OK guys....
is there a way to Print only 1 cell from a table?
I'd preferr to it to work when they hit the print button on the browser, I
know there is a window.onbeforeprint and a window.onafterprint... it just
doesn't seem to do what I want??
Any Ideas?
Message #5 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 21 Feb 2001 14:13:18 -0000
|
|
no...
style.visibility="hidden"
will make it not visible, but still take up space
style.display="none"
makes it disappear completeley
-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Wednesday, February 21, 2001 1:12 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Printing
if i use div's... and set the display to none, they still take up space
right?
I all the cells except one to go away or at least not take up any space....
-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Wednesday, February 21, 2001 7:40 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Printing
Nothing built in that does this
If you wanted them to use the normal print button (like you said), then you
could put divs around each bit you want to hide, and put onbeforeprint and
onafterprint event handlers that hide and show the divs.
<DIV onbeforeprint="style.display='none'"
onafterprint="style.display='block'">
</DIV>
(This will only work in IE)
Alternatively, you could have a print button on the page which uses DHTML to
hide everything else on the page, prints it, and then restores everything
else. Or you could create a new window, write the "innerHTML" of the cell
you want to print to it and print that window, then close it.
-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Wednesday, February 21, 2001 12:09 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Printing
OK guys....
is there a way to Print only 1 cell from a table?
I'd preferr to it to work when they hit the print button on the browser, I
know there is a window.onbeforeprint and a window.onafterprint... it just
doesn't seem to do what I want??
Any Ideas?
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Message #6 by "Wally Burfine" <oopconsultant@h...> on Wed, 21 Feb 2001 18:31:46 -0000
|
|
how about opening a new window that has the print in the on load and a close
in the after print?
Regards
Wally
>From: "O'Hara, Elliott M" <EMOHARA@k...>
>Reply-To: "ASP Web HowTo" <asp_web_howto@p...>
>To: "ASP Web HowTo" <asp_web_howto@p...>
>Subject: [asp_web_howto] Printing
>Date: Wed, 21 Feb 2001 07:08:46 -0500
>
>OK guys....
>is there a way to Print only 1 cell from a table?
>I'd preferr to it to work when they hit the print button on the browser, I
>know there is a window.onbeforeprint and a window.onafterprint... it just
>doesn't seem to do what I want??
>Any Ideas?
>
|
|
 |