title: A radio button calls a javascript function to show an input tag before form submission. After the same function fails to show the same input tag
body: <p>The javascript code works on the first call to show an input tag</p>
  
  <pre><code>function selbustbla(k)
  {
  if(k == 1)
  {
   document.getElementById("bustbl1").style.display = "none";
   document.getElementById("bustbl11").style.display = "block";
   }
   if(k == 2)
   {
   document.getElementById("bustbl1").style.display = "block";
   document.getElementById("bustbl11").style.display = "none";
   }
  }
  </code></pre>
  
  <p>The form and radio buttons calling the javascript.  One call is ok.  After submission the same function fails to show the input tag.    </p>
  
  <pre><code>&lt;form id="frm1" action="&lt;?php echo $_SERVER['PHP_SELF']?&gt;" method="POST" &gt;
  &lt;table&gt;
  &lt;tr&gt;&lt;td name="registration" id="registration"&gt;&lt;strong&gt;Register &lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;input type="radio" name="rdo" id="aupair" onclick="selbustbla(2)" value="aupair" &lt;? if(isset($_POST['rdo']) &amp;&amp; $_POST['rdo'] == 'aupair') echo "checked"; ?&gt; /&gt;First&lt;/td&gt;
  &lt;td&gt;&lt;input type="radio" name="rdo" id="babysitter" onclick="selbustbla(1)" value="babysitter" &lt;? if(isset($_POST['rdo']) &amp;&amp; $_POST['rdo'] == 'babysitter') echo "checked";?&gt; /&gt;Second&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;table id="bustbl1" name="bustbl1" style="display:none" &gt;
  &lt;tr&gt;
  &lt;td name="personal" id="personal" &gt;&lt;strong&gt;Personal &lt;/strong&gt;details&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Title:&amp;nbsp;&lt;/td&gt;           
  &lt;td&gt;&lt;input id = 'inputtitle' name = 'inputtitle' size = '4' maxlength = '4' type = 'text'&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;table id="bustbl11" name="bustbl11" style="display:none" &gt;
  &lt;tr&gt;&lt;td name="businessdetail" id="businessdetail" &gt;&lt;strong&gt;Business &lt;/strong&gt;details&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;Contact Name:&amp;nbsp;&lt;/td&gt;            
  &lt;td&gt;&lt;input id = 'businesscontact' name = 'businesscontact' type = 'text' size = '40' maxlength = '65'&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;input type = "submit" name = "Button"  value = "Register" margin-bottom: .5em" &gt;
  &lt;/form&gt;
  </code></pre>