Lets got right to it!
I have done a PHP calculation that I wan't to display on my website. The tricky part is that I want the values to be displayed, ONE value each time the user clicks ONCE on a button. It doesn't matter what kind of button it is, I just wan't to display a value on every click. The total number of values are 8 (fixed length), and right now I have 4 arrays with 2 values in each. So every thing is done and saved, I'm just trying to display it, one at the time. If it is easier I could bunch them together to 1 array. Im trying to make a sort of display:none vs display onclick thingy, but it is only showing the first value on each click. Very grateful for tips and tricks! Will a kind of FORM help me? By using input instead?
This is what I've got:
HTML
<a href="#" class="modern" onClick="showhide('first', 'block'); return false" >Give me your value</a> <div id="first"><?php echo $team1[0];?></div> <div class="secound"><?php echo $team1[1];?></div> <div class="third"><?php echo $team2[0];?></div> <div class="fourth"><?php echo $team2[1];?></div> ...
Javascript
function showhide(divid, state){
document.getElementById(divid).style.display=state
}
...