I have an odd problem.
I have button, “NextButton” that i want to hide initially but then when a checkbox is clicked, it should appear.
Below code doesn’t work and it doesn’t give any error. I’ve tested it on IE9 and FireFox 13
I searched other questions but couldn’t find the problem that i am having…
<html>
<head>
<script language="javascript">
function enableNext() {
alert("clicked");
var s1 = document.getElementsByName("NextButton");
s1.style.visibility = "visible";
}
</script>
</head>
<body>
<input type="submit" name="NextButton" value="Next" style="visibility:hidden;"/>
<input type="checkbox" onClick="enableNext()" />
</body>
</html>
An array is returned in your code and you are applying style to an array. Change it to the code below.