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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print page issue

Status
Not open for further replies.

fairfaxVB

Programmer
Nov 3, 2005
46
US
Hi friends,
We have a big width report in frame structure.
After clicked print butun in borrower or javascript print function, users can not print out whole report.
the report shout be cut off for over paper size.
I wish that print function can print rest information in next page other than cut off? it only print 12 columns. there are 40 columns in report)
Thanks
FairfaxVB

my codes*******************
<html><HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function varitext(text){
text=document
print(text)
}
// End -->
</script>

</HEAD>
<DIV ALIGN="CENTER">
<FORM name="document">
<INPUT NAME="print" TYPE="button" VALUE="Print!"
ONCLICK="varitext()">

here is a big html table with 6200 width (40 culumns)
</FORM></body></html>
 
you cannot do anything with javascript to avoid this print issue. the best you can do is use Cascading Style Sheets (CSS) to style your page appropriately so it fits on your standard page size.



*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
cLFlaVA, Thanks for your email.
in frame structure., can we use a print button in one frame to print other frame information? So that we avoid to print 'print button ' in report paper.
thanks
FairfaxVB
 
Hi clFlaVA and friends,
I created a code to print frame drt information.
there are a dynamic frames(2 level).
I got an error message as "top.frames[0].frames[1].document is null or not object"

how to fix this issue?
Thanks
FairfaxVB
<script>

function framePrint(){
alert("gg");
top.frames[0].frames[1].document.drt.focus();
top.frames[0].frames[1].document.drt.print();
alert("check");
}
</script>
 
Try re-reading cLFlaVA's example (your code is not implementing what he suggested).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
however, i can submit this form by
<form method="post" name="ppc" action="second.html" target="drt" onSubmit= "return checkEntry(this)">
 
i changed to top.frames["drt"].print().
but i got same message" top.frames.drt is null or not object.
there are 2 level frame switch and drt in this application.
-- example level first have 2 frame
home.html
<frameset frameborder="Yes" framespacing="2" border="1" cols="*" rows="60,*">
<frame marginwidth="0" marginheight="0" src="new_rpt_head" name="heading" noresize scrolling="no">
<frameset frameborder="Yes" framespacing="1" border="1" cols="200,*" >
<frame marginwidth="5" marginheight="5" src="secd.html" name="switch" >
</frameset>
</frameset>
----- level 2 have 2 frame in secd.html i want to print drt (getin.html from ent.html
<frameset frameborder = "YES" framespacing = "0" border = "1" rows = "36%,*%" >');
<frame marginwidth="5" marginheight="5" src="ent.html" >
<frame marginwidth="5" marginheight="5" src="getin.html" name="drt" border="1" scrolling="auto">
</frameset>
 
Hi clFlavA,
Thanks for your help!
the javascript locates in ent.html and print drt frame
(getin.html)
both ent.html and getin.html locate secd.html.
I can call dir by <form method="post" name="ppc" action="getin.html" target="drt" onSubmit= "return checkEntry(this)">


any idel?

thanks very much


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top