I have a function on one of my PHP pages that allows the user to see a hidden form (they have to click on a check box). The code works fine in FireFox and Chrome, but fails in IE 8 (the earliest version of IE I'll support). I'm testing this on a development system with XP Pro and it may be an XP problem – but since XP is still has 25% of the share, I have to make sure what ever function I use will work in that environment. Here's the code:
Code: Select all
function ShowHide() {
var head1 = document.getElementById("head1");
var showform = document.form1.head1.checked;
head1.style.visibility=(showform) ? "visible" : "hidden";
}
<!-- Farther down the page -->
<input type="checkbox" name="head1" unchecked onclick="ShowHide(); " />Cheers,
Rick