title: Javascript-CSS Show and Hide form elements
body: <p>By using Javascript how to show and hide some parts of the table(Eg: TR or TD). This should work depending on the data fetched from the Database
  I am using CakePHP framework for my Application and using a single view file for Add and Edit.
  In Edit mode - Depending on the data fetched, I need to show and hide some parts of the form elements.</p>
  
  <p>Scenario
  There are five questions A,B,C,D nad E
  B is dependent on A, C is dependent on B, D is dependent on C and E is dependent on D
  So while adding I have hidden B,C,D and E
  on selecting of the respective questions the other questions will be displayed.
  A,B,C,D - All are "Yes/No"(radio buttons) questions. </p>
  
  <p>Eg: </p>
  
  <pre><code>&lt;'table&gt;
  &lt;'tr id='a'&gt;
    &lt;'td colspan='2'&gt;A&lt;'/td&gt;
  &lt;'/tr&gt;  
  &lt;'tr id='b'&gt;
    &lt;'td colspan='2'&gt;B&lt;'/td&gt;
  &lt;'/tr&gt;
  &lt;'tr id='cd'&gt;
    &lt;'td id='c'&gt;C&lt;'/td&gt;&lt;'td id='d'&gt;D&lt;'/td&gt;
  &lt;'/tr&gt;
  &lt;'/table&gt;
  </code></pre>
  
  <p>(' Prefix for all HTML tags)</p>
  
  <p>How can I do it. Please post your comments.</p>