HTML Form Field Hiding

Beatnik on 2004-04-18T22:33:55

This is a nice HTML/Javascript trick I learned today... Hiding form fields

<form>
<a href='#' onclick="o=document.getElementById('hideThis'); if(o.style.display=='inline'){o.style.display='none';}else{o.style.display='inline';}">toggle me</a>
<input id="hideThis" style="display:inline" type="text" size="30">
</form>


There have been occasions when I added an extra pop-up window containing all the advanced fields in a form.. now I can just hide them :)


Even in Javascript,

Juerd on 2004-04-19T10:55:00

whitespace is free.