place informational text (and not only text) at the top of apage

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
fgazza
Veteran Member
Posts: 205
Joined: 2019-04-30 17:37

place informational text (and not only text) at the top of apage

Post by fgazza » 2019-08-10 09:58

Ciao a tutti,
con l'aiuto di <a
href=memberlist.php?mode=viewprofile&u=9339>onoehring</a> ho preparato questo codice to place informational text (and not only text) at the top of a page:
Visto che nella pagina generata con il mio codice apariva un misterioso pulsante "invia" ho aggiunto nello style della pagina il codice
input#EnterAction {visibility: hidden !important;}
in modo da farlo sparire (in relazione a ciò please make sure, that other stuff in your application works. The button might be needed for something else).
Immagine 001.png
Immagine 001.png (104.64 KiB) Viewed 1929 times
Imm 002.png
Imm 002.png (115.6 KiB) Viewed 1929 times
Ecco qui il codice:

case 'detailview':
$header='<%%HEADER%%>
<div class="col-lg-offset-0 col-lg-12" >
<div class="alert alert-danger">
<style>
#expand {display: none;}
input#EnterAction {visibility: hidden !important;}
</style>
<p><span id="less"></span><span id="expand">Put here text/html content.. for example: <img src="pic_trulli.jpg" alt="Trulli" width="500" height="333">
</span></p>
<button onclick="myFunction()" id="expandBtn">Give a name to this button</button>

<script>
function myFunction() {
var less = document.getElementById("less");
var moreText = document.getElementById("expand");
var btnText = document.getElementById("expandBtn");

if (less.style.display === "none") {
less.style.display = "inline";
btnText.innerHTML = "Give a name to this button";
moreText.style.display = "none";
} else {
less.style.display = "none";
btnText.innerHTML = "hide";
moreText.style.display = "inline";
}
}
</script>
</div></div>';
break;

fgazza
Veteran Member
Posts: 205
Joined: 2019-04-30 17:37

place informational text (and not only text) at the top of a page with "read more/read less" option

Post by fgazza » 2019-08-10 11:40

Sorry... I forget to translate the previous post.

Hi everyone,
with the help of onoehring ( memberlist.php?mode=viewprofile&u=9339 ) I have prepared this code to place informational text (and not only text) at the top of a page:
Since in the page generated with my code a mysterious "send" button appeared I added the code in the page style
input # EnterAction {visibility: hidden! important;}
in order to make the mysterious send button disappear (in relation to this please make sure, that other stuff in your application works. The button might be needed for something else).

this is the header when the page opens:
Immagine 001.png
Immagine 001.png (104.64 KiB) Viewed 1922 times

and this is the header once the button is pressed (to expand the content).
Imm 002.png
Imm 002.png (115.6 KiB) Viewed 1922 times
By pressing the button again it is possible to compress the content and return to the initial view.

The text of the buttons can be customized


Here is the code:

case 'detailview':
$header='<%%HEADER%%>
<div class="col-lg-offset-0 col-lg-12" >
<div class="alert alert-danger">
<style>
#expand {display: none;}
input#EnterAction {visibility: hidden !important;}
</style>
<p><span id="less"></span><span id="expand">Put here text/html content.. for example: <img src="pic_trulli.jpg" alt="Trulli" width="500" height="333">
</span></p>
<button onclick="myFunction()" id="expandBtn">Give a name to this button</button>

<script>
function myFunction() {
var less = document.getElementById("less");
var moreText = document.getElementById("expand");
var btnText = document.getElementById("expandBtn");

if (less.style.display === "none") {
less.style.display = "inline";
btnText.innerHTML = "Give a name to this button";
moreText.style.display = "none";
} else {
less.style.display = "none";
btnText.innerHTML = "hide";
moreText.style.display = "inline";
}
}
</script>
</div></div>';
break;


Post Reply