View Single Post
Old 11-21-08, 10:25 AM   #16
Ngemu Mod
Join Date: Jul 2003
Location: Fresno, CA
Posts: 1,886
Default Re: Need some help making medical website

You can also use javascript/CSS to hide parts of the form until certain elements are clicked. For example, lets say you have a checkbox that if clicked will show a selection element.

function showOptions(){

  var box = document.getElementById('cbox');
  var sel = document.getElementById('slbox);

  if(box.checked == true){ = 'block';    // show element
  }else{ = 'none';    // hide element
<form name='form' action=''>

  <input id='cbox' type='checkbox' name='cbox' onClick='showOptions();'></input><br />
  <select id='slbox' name='slbox' style='display:none;'>
  <option value='blue'>Blue</option>
  <option value='green'>Green</option>
The hidden select menu will be hidden or shown depending on the status of the checkbox.
[i7 2600k @4.4ghertz][2x4 GB DDR3 1600][EVGA GTX570 1.280GB SC][EVGA GTX460 physx][Asrock Extreme7 Gen3 Z68][2xSeagate 160 Gb SATA HD raid0][Seagate 250 GB SATA2 HD][Sony Bravia 40' 1080p LCD HDTV][NEC 3520a DVD+-DLw][Windows 7 Ultimate x64][Rosewill 1000w]
fivefeet8 is offline   Reply With Quote