place informational text (and not only text) at the top of apage
Posted: 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).
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;
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).
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;