PDA

View Full Version : printing inside ie


Bluemonkey
11-18-2002, 04:08 PM
is there away that i can print the current page all form scripts so it can do it automatically??

thanks for the help

brothercake
11-18-2002, 04:25 PM
You can always initiate a print request, simply by going

window.print()

Which will open the print dialogue

Bluemonkey
11-18-2002, 06:27 PM
true but hwo can i get past the next screnn automatically??

Paweł
11-18-2002, 08:39 PM
Hi !
This code, for example :

<script language='JavaScript'>
function GetOut() {
window.location='my_new_page.htm';
}

window.print();
window.setTimeout( "GetOut()",2000 );
</script>

waits 2 seconds for a print and then goes out automatically.

:) Paweł

brothercake
11-19-2002, 08:12 PM
Do you mean - how to get past the print dialogue and just automatically start printing?

You can't. Which is just as well, because theoretically you could be sued for doing that. Also bear in mind - how do you know your user has a printer? I don't have one.

Borgtex
11-19-2002, 08:44 PM
Originally posted by brothercake

You can't. Which is just as well, because theoretically you could be sued for doing that. Also bear in mind - how do you know your user has a printer? I don't have one.


I think that you can, with VBScript; I did it with IE4, but don't ask me how; I can't remember