Jump to content

unhide buttons


Recommended Posts

So i have an html area as shown and when i hit print the print and close buttons disappear since i don't want them printed, problem is that when the print screen is open and i cancel because i forgot to add something to the form the form comes back up but the buttons don't of course since i hid them, would there be a way to get those back. I know f5 will bring them back but will also wipe out anything in the text box.



Link to comment
Share on other sites

I am guessing that hiding the buttons is necessary because by whatever means of getting the text box to print they are part of the identified area to get printed.

But if the area is identified by a specific node, tag name, or tag attribute, would it be possible to narrow the identified area to be printed to just the text box?


Link to comment
Share on other sites

When the button is clicked these events take place

1) Hide 1 button

2) hide second button

3) Print

This opens the print window in the same window , when i select cancel the textarea window opens back up but the buttons are gone, when i click F5 the buttons come back and the txtarea is still populated, when i click CTRL F5 the windows refreshes but the txtarea will be empty. I am not sure how i can open the print window with only the txtarea showing


Link to comment
Share on other sites

<!doctype html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes">
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
<link href="https://www.wilstv.com./css/jquerysctipttop.css" rel="stylesheet" type="text/css">
  body { background-color: #fff; font-family:'Roboto Condensed' ; }
  .container { margin: 10px auto; max-width: 700px; }
form#e {
  max-width: 700px;
  margin-bottom: 2vh
form#e label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #b3b3b3;
  font-size: 18px
form#e label .jQTAreaCount, form#e label .jQTAreaValue {
  font-weight: bold
form#e label .jQTAreaValue {
  color: #595959;
form#e textarea {
  border: 1px solid #000;
  width: 700px;
  height: 50vh;
  font-size: 16px;
  color: #666;
  padding: 10px;
  resize: none;
  overflow: hidden;
form#e p {
  height: 4px;
  margin-top: 2px;
  background-color: #ccc;
<body class="table"><div id="jquery-script-menu">
<div class="jquery-script-center">
<div class="jquery-script-ads"><script type="text/javascript"><!--
<div class="jquery-script-clear"></div>
  <div class="container">
 <form id="e">
                <label for="example">
                        Type your information below. (Limit 1000 Chracters)
                        <em class="jQTAreaCount"></em> / <em class="jQTAreaValue"></em>
                <textarea id="example" name="example"></textarea>
                <p class="jQTAreaExt" width= "560px"></p>
<div align="center">
<table border="1" width="560">
        <button type="submit" id="ThemeableButton1" onclick="ShowObject('ThemeableButton1', 0);ShowObject('ThemeableButton2', 0);window.print();return false;" name="" value="Print" style="position:absolute;width:126px;height:22px;">Print</button>
        <button type="submit" id="ThemeableButton2" onclick="history.back();return false;" name="" value="Close" style="position:absolute;width:126px;height:22px;">Close</button>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script src="https://wilstv.com/plugin/plugin-jqtarea.js"></script>
                setLimit: 1000,
                setExt: "W",
                setExtR: true

Link to comment
Share on other sites

Can't you just use something like:

add the following to your page styling 

@media print{

then just add the class "no-print" to the buttons you don't want to print..


That way the buttons are always there but just not when printing.

Link to comment
Share on other sites

16 minutes ago, bsmither said:

Depending on the sophistication of your Themeable Button Events tab, after the javascript event, there may be the ability to add an event where the 'Event' is "onafterprint" and the action is "Unhide" or "Show" the buttons.


From what I recall the onafterprint has limited cross browser support so if its customer facing could be buggy for some. 

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...