Jump to content
Fórum Script Brasil
  • 0

Visualizar Impressão


Mauricio-SBC
 Share

Question

boa tarde...

eu tenho uma pagina que so tem a parte de status....tipo não tem a barra de menu, nem a de ferramenta...so que eu gostaria que minha pagina tivesse um botao que faça a mesma coisa que o visualizar impressão(print preview) do internet explorer...

alguém poderia me ajudar??obrigado pela atenção e ajuda...

Mauricio

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Guest - PR Web Master -

<script language="javascript">

function printpr(OLECMDID)

{

//var OLECMDID = 10;

/* OLECMDID values:

* 6 - print

* 7 - print preview

* 8 - page setup (for printing)

* 1 - open window

* 4 - Save As

* 10 - properties

*/

var PROMPT = 1; // 1 PROMPT & 2 DONT PROMPT USER

var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';

document.body.insertAdjacentHTML('beforeEnd', WebBrowser);

WebBrowser1.ExecWB(OLECMDID,PROMPT);

WebBrowser1.outerHTML = "";

}

</script>

<form name="form">

<div align="center"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Selecione

a Op&ccedil;&atilde;o desejada:<br>

</font>

<select name="olecmdid" class="select1">

<option value="6">Imprimir</option>

<option value="7">Visualizar Impressão</option>

<option value="8">Configurar Pagina</option>

</select>

<input type="Button" class="select1" onclick="printpr(document.form.olecmdid.value);" value="Entrar">

</div>

</form>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.7k
    • Total Posts
      648.5k
×
×
  • Create New...