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

Print a single frame, then redirect that frame?

Status
Not open for further replies.

Junior1544

Technical User
Joined
Apr 20, 2001
Messages
1,267
Location
US
I'm brand new to Java(30 minutes or so)...

Normaly I'm developing a web site in asp.net...

But I'm have a problem that needs Client side script.

I need a page, when it loads. to print, then redirect...

(This is a report that get's printed but never displayed on the screen...)

If you have another solution other then what I'm tring to do, please, tell me...

This is the first time I'm using JavaScript at all, but I've been programming for a few years in other languages.

Thanks
--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
I don't think so using conventional client side script. You will need to display the page to execute a print function and I don't think you will be able to get the client to print without the user's permission.

ToddWW
 
ok, I've been looking around... I've seen
Window.print()
That brings up a print dialog... i guess i'll have to deal with that for now...

how about moving on to the next page after The page prints?

If i put these together the page forwards befor the print dialog comes up.

window.print()
Location = "newurl.com/path/"

??

Thanks.
--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
I don't think so. I don't think you can interact with the printer buffer with script. And we all know that the window AND document need to be present until the printer buffer gets its data. There might be some more unconventional way to do it. If you're using frames, you could load the page into an invisible frame or a frame that is 1px by 1px and print from there. Something to hide the page while it's printing. Just some thoughts. I would figure out a way if I put my mind to it.

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top