Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I hide/unhide Web Form Section? 1

Status
Not open for further replies.

solok

Programmer
Oct 1, 2003
13
US
I want to hide (collapse) a section of my web form until the the "yes" checkbox is checked, making the section become visible to fill in data...
 
Code:
<input type=checkbox onClick="document.getElementById('formDiv').style.display = this.checked ? 'block' : 'none'">

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook

 
BTW - This is a pure javascript question - better posted in forum216

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook

 
Actually, considering it is an ASP.Net question and you have to get around your...uhh...bottom to get to your elbow in order to use javascript with ASP.Net, you may be better off asking in the ASP.Net forum.

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top