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

click link to print page at differnet url, without showing page? 1

Status
Not open for further replies.

spastica

Programmer
Sep 27, 2002
72
GB
I want the user to click a link that automatically prints a page that is located at a different url, without showing or going (in the window) to the actual page that i want to be printed.

i have tried (as a compromise):

<body topmargin=&quot;0&quot; leftmargin=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; bgcolor=&quot;#ffffff&quot; <%
if request.querystring(&quot;print&quot;)=&quot;true&quot; then
response.write (&quot;onload=&quot;&quot;javascript:self.print(); self.close()&quot;&quot;&quot;)
end if
%>>

but this shows the window that is to be printed, and i want it to be hidden.

is this impossible to do? or is there a way to do this?

thanks in advance!

 
Spastica,
Did you ever solve this? I am having the same question!


Sera
I often believe that...
My computer is possessed!
 

i have seen some sites that have a tiny popup window...maybe have something like that...set it to width=1 and height=1 or something. then call the page like normal, using your code to print if url=print...maybe even minimize the page...in the title have the same test and if print, then have title read 'printing...'...

just an idea.

or if you want to get created, have a frame on the page, hidden with no scrollbars...then call the page into the frame if the user clicks the print option. use your code and print. the user is none the wiser.

hope that helps.

- g
 
Geez that seems so obvious....of course a hidden frame is a good idea. I don't really like the idea of a small window...cause that always annoys me when see it on other websites....but the hidden frame is an awesome idea. Thanks!


Sera
I often believe that...
My computer is possessed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top