hi, i have these two functions:
function valfrp(chk){
if (chk.checked == 1){
document.getElementById(frp1).style.display = 'none';
document.getElementById(frp1).style.display = 'block';
document.getElementById(frp1).style.display = 'none';
}
}
function valfrd(chk){
if (chk.checked == 0)
document.getElementById(frdim).style.display = 'none';
html
<input type="checkbox" onclick="showhide('poolfr1');showhide('poolfr2');valfrd(C1, frdim);" name="C1" onchange="valfrp('C1');" value="ON" />
...
<div id="frdim" style="display:none">
<table border="0" width="100%">
<tr> <td>A:
<INPUT type="text" name="T20" size="20"></td> <td>B:
<INPUT type="text" name="T21" size="20"></td> <td>C:
<INPUT type="text" name="T22" size="20"></td> <td>D:
<INPUT type="text" name="T23" size="20"></td>
</tr>
</table>
...
</table> </td> <td>
<img border="0" src="pics/u123.png" width="255" height="152" id="frp1" />
<img border="0" src="pics/u149.png" width="255" height="152" id="frp2" style="display:none;" />
<img border="0" src="pics/u184.png" width="255" height="152" id="frp3" style="display:none;" /></td>
</tr>
</table>
}
I need help with those two functions; they don't do what I want to do - switch pics and hide one section/table.
any ideas please?
function valfrp(chk){
if (chk.checked == 1){
document.getElementById(frp1).style.display = 'none';
document.getElementById(frp1).style.display = 'block';
document.getElementById(frp1).style.display = 'none';
}
}
function valfrd(chk){
if (chk.checked == 0)
document.getElementById(frdim).style.display = 'none';
html
<input type="checkbox" onclick="showhide('poolfr1');showhide('poolfr2');valfrd(C1, frdim);" name="C1" onchange="valfrp('C1');" value="ON" />
...
<div id="frdim" style="display:none">
<table border="0" width="100%">
<tr> <td>A:
<INPUT type="text" name="T20" size="20"></td> <td>B:
<INPUT type="text" name="T21" size="20"></td> <td>C:
<INPUT type="text" name="T22" size="20"></td> <td>D:
<INPUT type="text" name="T23" size="20"></td>
</tr>
</table>
...
</table> </td> <td>
<img border="0" src="pics/u123.png" width="255" height="152" id="frp1" />
<img border="0" src="pics/u149.png" width="255" height="152" id="frp2" style="display:none;" />
<img border="0" src="pics/u184.png" width="255" height="152" id="frp3" style="display:none;" /></td>
</tr>
</table>
}
I need help with those two functions; they don't do what I want to do - switch pics and hide one section/table.
any ideas please?