HTML form element hidden onload javascript

DrWayneCar

New Member
Trying to get a HTML text input to be hidden on load, but then if a radio button is checked then the form will show.http://pastie.org/private/ah39ul5h4jtmlntkbmmdaI've got it working sort of, I just need the field to be hidden on page load.\[code\]<form action="profile_edit_gravatar.php" method="post"> <label class="radio inline"> <input type="radio" <?php if($row[16]=='account') {echo ' checked';}?> onload="this.form.otheremail.style.visibility='hidden';" onclick=" if (this.checked) { this.form.otheremail.style.visibility='hidden'; } else { this.form.otheremail.style.visibility='visible'; } return true; "> Use <?php echo $row[3];?> </label> <input type="text" name="otheremail"></form>\[/code\]
 
Back
Top