Button Click Reveals Hidden Button

[Total: 0    Average: 0/5]

This will reveal a hidden form button when the first button is clicked.

Head Code:

style>
#hideme {visibility: hidden;}
</style>
<script>
var LOCK=0;
var _AR=new Array();
    _AR[0]="hidden";
    _AR[1]="visible";
function doIt(_v)
{
  LOCK=_v;
  document.getElementById("hideme").style.visibility=_AR[_v];
}
function click(_l)
{
  if(!LOCK)document.location=_l;
}
</script>

Body Code:

<a href="javascript:click('http://www.js-examples.com/')">HREF to CLICK</a>
<form><input type=button value="click me 1" onclick="doIt(1)"></form>
<hr>
<div id=hideme>
Other stuff
<form><input type=button value="click me 2" onclick="doIt(0)"></form>
</div>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *