Heres whats happening: The first spoiler works fine when I click it, but then the second spoiler doesn't open up at all.
<html>
<head></head>
<body>
<strong>Why doesn't this work?</strong>
<div style="margin-bottom:2px">
Spoiler:
<input type="button" value="Display" style="width:65px;font-size:10px;margin:…
onclick="if (this.parentNode.parentNode.getElementsB… != '')
{
this.parentNode.parentNode.getElements… = '';
this.innerText = ''; this.value = 'Hide';
} else {
this.parentNode.parentNode.getElementsBy… = 'none';
this.innerText = ''; this.value = 'Display';
}">
</div>
<div style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
Spoiler!
Spoiler!
Spoiler!
</div>
</div>
<div style="margin-bottom:0px">
Spoiler:
<input type="button" value="Display" style="width:65px;font-size:10px;margin:…
onclick="if (this.parentNode.parentNode.getElementsB… != '')
{
this.parentNode.parentNode.getElementsBy… = '';
this.innerText = ''; this.value = 'Hide';
} else {
this.parentNode.parentNode.getElementsBy… = 'none';
this.innerText = ''; this.value = 'Display';
}">
</div1>
<div1 style="margin: 0px; padding: 6px; border: 1px inset;">
<div1 style="display: none;">
Spoiler2!
</div1>
</div>
</body>
</html>
<html>
<head></head>
<body>
<strong>Why doesn't this work?</strong>
<div style="margin-bottom:2px">
Spoiler:
<input type="button" value="Display" style="width:65px;font-size:10px;margin:…
onclick="if (this.parentNode.parentNode.getElementsB… != '')
{
this.parentNode.parentNode.getElements… = '';
this.innerText = ''; this.value = 'Hide';
} else {
this.parentNode.parentNode.getElementsBy… = 'none';
this.innerText = ''; this.value = 'Display';
}">
</div>
<div style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
Spoiler!
Spoiler!
Spoiler!
</div>
</div>
<div style="margin-bottom:0px">
Spoiler:
<input type="button" value="Display" style="width:65px;font-size:10px;margin:…
onclick="if (this.parentNode.parentNode.getElementsB… != '')
{
this.parentNode.parentNode.getElementsBy… = '';
this.innerText = ''; this.value = 'Hide';
} else {
this.parentNode.parentNode.getElementsBy… = 'none';
this.innerText = ''; this.value = 'Display';
}">
</div1>
<div1 style="margin: 0px; padding: 6px; border: 1px inset;">
<div1 style="display: none;">
Spoiler2!
</div1>
</div>
</body>
</html>