..:: MX Studio Fóruns ::..: Impressao - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Impressao

#1 User is offline   babu 

  • Group: Membros
  • Posts: 1078
  • Joined: 19-December 03

Posted 18 March 2005 - 12:52 PM

Salve tongue.gif

Como abrir a caixa de configuração de impressão via JavaScript do seu browser w configurar a impressora.

existe um exemplo de link e um exemplo utilizando um botão, vc pode otimizar do seu jeito esse código.


QUOTE
<html>
<HEAD>
<script language="javascript">
<!--
// IE3 workaround vbscript objects
DA = (document.all) ? 1 : 0

window.onerror=handle_error

function handle_error(){
return true;
}
//-->
</script>
<script LANGUAGE="VBScript">
sub print
olecmd = 6
oleparam = 1
on error resume next

WB.ExecWB olecmd, oleparam

if err.number <> 0 then
if DA then ' IE4 - User Cancelled

else ' IE3 - Other Instructions
handle_error
end if
end if
end sub
</SCRIPT>
</head>

<BODY>
<form>
<Input type=button value="Print This Page"

onclick="window.print();">
</form><p>
<a href="#" onclick="window.print();">Imprimir</a>
<OBJECT
ID="WB"
WIDTH=0
HEIGHT=0
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
</OBJECT>
</Body>
</html>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)