Changing content of a TD

Asked

Viewed 49 times

0

I’m trying to get a function to modify the content of a TD cell in my table.

I want to go from:

<td id="tdDespesas" style="border-right:1px solid #FFFFFF;border-bottom: 1px solid #FFFFFF;">{label_orcadoRealizado_despesas}
    <img id='btnOne' src='{raiz}images/layout/row_plus.gif' onclick='showLines()' title='Extender' style='cursor: pointer; margin-left: 5px;'/>
    <img id='btnTwo' src='{raiz}images/layout/row_minus.gif' onclick='hideLines()' title='Diminuir' style='cursor: pointer; margin-left: 5px;'/>
</td>

To:

<td id="tdDespesas" style="border-right:1px solid #FFFFFF;border-bottom: 1px solid #FFFFFF;">{label_orcadoRealizado_despesas}
</td>

I need to do this because the function would be a PDF print and unfortunately are appearing the codes of the btnOne and btnTwo buttons. Put Hide or display: None on buttons do not work for now.

What would be the best solution? Innerhtml or Innercontent unfortunately do not work.

1 answer

0

If printing is the problem, then use @print in CSS, so you can hide the buttons only when printing.

Example:

@media print{

  .btnOne, .btnTwo { display:none; }
}
  • I don’t know, but I believe the right thing would be @media print { ... } on @Wallacemaxters

Browser other questions tagged

You are not signed in. Login or sign up in order to post.