Posts: 334
Name: El Phantasmo
Location: England, north west
|
Im trying to create a simple script that will make a <p> tag appear, but in the Firefox console I get the error
Quote:
|
document.form1.visible has no properties
|
here is the code im using:
CSS:
Code:
.visible {
visibility:hidden;}
HTML:
Code:
<p class="visible" id="visible">
<label for="other" class="labelDef">Other</label>
<input type="text" name="other" id="other" />
<label for="button"></label>
<br class="clear" />
</p>
javascript :
Code:
function appear()
{
document.form1.visible.style.visibility="visible";
}
Any ideas what Im doing wrong? I did originally set it so that the html name could be passed as an argument, as I wanted to be able to re use the script for other elements. But the script was causing me so much hassle its wound its way down to what's above!
|