Forum Moderators: open
First question: Any issues with this code? Does it look optimum?
And a supplementary question:
If a user says it isn't working for them, what is it that they are most likely to have either not installed, or switched off these days that would stop a simple script like this?
<script type="text/javascript" language="JavaScript"><!--
function RemoveContent(d) {
document.getElementById(d).style.display = "none";
}
function InsertContent(d) {
document.getElementById(d).style.display = "";
}
//--></script>
==== HTML part ====
<a href="javascript:InsertContent('div1')">
Show
</a>
<a href="javascript:RemoveContent('div1')">
Hide
</a><br>
<div id="div1" style="display: none;">
<b>This content NOT initially displayed</b>
</div>
<hr>
<a href="javascript:InsertContent('div2')">
Show
</a>
<a href="javascript:RemoveContent('div2')">
Hide
</a><br>
<div id="div2" style="display: block;">
<b> This content IS initially displayed </b>
</div>