Question

2
Replies
151
Views
SateeshK5805 Member since 2016 3 posts
Accenture
Posted: 2 years ago
Last activity: 2 years 6 months ago
Closed
Solved

How to Hide buttons and other additional text when we click on Print.

Can u suggest a approach that not to Print Buttons and other additional text and should to print only the body of HTML. I included following code in the HTML :

<td nowrap='nowrap' align='center'>
<button onclick="myFunction()" class='littleButton' title='<pega:lookup property=".pyActionPrompt" value="Print"/>' id="button3" name="button">
<span class='buttonLeft'></span>
<span class='buttonMiddle'>
<span class='buttonText' onmouseover="this.className='buttonTextHover'" onmouseout="this.className='buttonText'"><pega:lookup property=".pyButtonLabel" value="Print"/></span>
</span>
<span class='buttonRight'></span>
</button>
</td>

<script>
function myFunction()
{
window.print();
}
</script>

User Interface
Moderation Team has archived post
Share this page LinkedIn