Opening PDF on screen

0

I have a problem in making my PDF open within a table .

How to show image , by clicking on "Open PDF" it shoots the file in a new tab. But how to make the PDF file open inside the table ?

    
asked by anonymous 19.05.2014 / 15:55

1 answer

1

As Marciano.Andrade said, I will inform the code showing how the implementation was from the call menu (how big it will be to separate for easy visualization)

Menu:

<html>
<head>
<style>

body, table {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}

.menu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #000033;
background-color: #FFFFFF;
border-right: 1px solid #000000;
border-top: 1px solid #000000;
border-bottom: 1px solid #000000;
padding: 5px;
cursor: hand;
text-align: center;
}

.menu-sel {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #0000FF;
background-color: #FFFAFA;
border-right: 1px solid #000000;
border-top: 1px solid #000000;
padding: 5px;
cursor: hand;
}

.tb-conteudo {
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
}

.conteudo {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: #000033;
background-color: ;
padding: 5px;
width:990px;
height: 460px;
}

</style>
<script language="JavaScript">

function stAba(menu,conteudo)
{
  this.menu = menu;
  this.conteudo = conteudo;
}

var arAbas = new Array();
arAbas[0] = new stAba('td_cada','div_cada');
arAbas[1] = new stAba('td_alt_exc','div_alt_exc');
arAbas[2] = new stAba('td_cons','div_cons');

function AlternarAbas(menu,conteudo)
{
  for (i=0;i<arAbas.length;i++)
  {
   m = document.getElementById(arAbas[i].menu);
   m.className = 'menu';
   c = document.getElementById(arAbas[i].conteudo)
   c.style.display = 'none';
  }
  m = document.getElementById(menu)
  m.className = 'menu-sel';
  c = document.getElementById(conteudo)
  c.style.display = '';
}

</script>

</head>

<body onLoad="AlternarAbas('td_cada','div_cada')">
<table width="100%" height="50"  align="left" valign="" cellspacing="0" cellpadding="0" border="0" style="border-left: 1px solid #000000;">
    <tr>
        <td height="20" width="25%" class="menu" id="td_cada" onClick="AlternarAbas('td_cada','div_cada')">Incluir</td>
        <td height="20" width="25%" class="menu" id="td_alt_exc" onClick="AlternarAbas('td_alt_exc','div_alt_exc')">Alterar - Excluir</td>
        <td height="20" width="25%" class="menu" id="td_cons" onClick="AlternarAbas('td_cons','div_cons')">Consultar</td>
        <td width="25%" style="border-bottom: 1px solid #00000F"> &nbsp;</td>
    </tr>

<tr>
    <td height="460" width="10%" class="tb-conteudo" colspan="3">
        <div id="div_cada" class="conteudo" style="display: block; padding-top:5px;">
            <table border="0" width="50%">
                <tr>
                    <td>
                        <iframe style="border-radius:20px;" scrolling="no" src="../sai_cada_usua/sai_frm_incl_usua.php" width="190%" height="450" >
                        </iframe>
                    </td>
                </tr>
          </table>
       </div>

        <div id="div_alt_exc" class="conteudo"  style="display: none; padding-top:5px;">
            <table border="0" width="50%">
                <tr>
                    <td>
                        <iframe style="border-radius:20px;" scrolling="no" src="../sai_cada_usua/sai_frm_alte_excl_usua.php" width="190%" height="450" >
                        </iframe>
                    </td>
                </tr>
            </table>
        </div>

        <div id="div_cons" class="conteudo" style="display: block; padding-top:5px;">
            <table border="0" width="50%">
                <tr>
                    <td>
                        <iframe style="border-radius:20px;" scrolling="no" src="../sai_cons/sai_cons_usua.php" width="190%" height="450" >
                        </iframe>
                    </td>
                </tr>
          </table>
       </div>

   </td> 
</tr>

</table>
</body>

    <td width="33%">
        <button type="button" style="width:65" onclick='javascript:parent.location.replace("../sai_prin/menu_com_abas_cada.php")'>
            <image src="../sai_imag/cancelar.ico">
        </button>
    </td>
</html>

Query Tab:

<html>
<script language="javascript">
    tms=new Array()
    function over(n)
    {
    if(typeof(tms[n])!="undefined")
        clearTimeout(tms[n])

    document.getElementById("s"+n).style.visibility="visible"
    }
    function out(n)
    {
        tms[n]=setTimeout('document.getElementById("s'+n+'").style.visibility="hidden"',200)
    }
</script>

<style type="text/css">
    .menuitem
    {
        float: left;
        top: 0px;
        left: 25px;
        font-size: 15px;
    }
    .menuitem a
    {
        position:absolute;
        left:50%;
        top:35%;
        margin-left:-110px;
        margin-top:-100px;
        display: block;
        margin-top: 10px;
        padding: 34px;
        align: center;
        width: 85px;
    }

</style>
<br><br>
<!--Consulta Usuario-->
<div class="menuitem" onmouseover="over(1)" onmouseout="out(1)" width="20" align="center" height="20">
    <a href="../sai_cada_usua/sai_cons_usua.php">
    <image src="../sai_imag/botao_clique_aqui.jpg">
</div>
</html>
    
23.05.2014 / 13:38