Hide or Show Select Box

[Total: 0    Average: 0/5]

Click on the radio button and the forum select box appears.

Body Code:

<script language="JavaScript" type="text/javascript">

function toggle(_s,_h) {
  if (document.all) {
     eval("document.all."+_s+".style.visibility='visible';");
     eval("document.all."+_h+".style.visibility='hidden';"); }
  else {
    if(navigator.userAgent.indexOf("Gecko")!=-1) {// is NS6 ?
      document.getElementById(_s).style.visibility='visible';
      document.getElementById(_h).style.visibility='hidden'; }
    else {
    eval("document.layers['"+_s+"'].visibility='show';");
    eval("document.layers['"+_h+"'].visibility='hide';"); }
  }
}
</script>



<table width="170px" border="0" cellspacing="0" cellpadding="0" >
 <tr>

  <td>
  <form name="form2">
  <input type="radio" name="pap" value="mat"
onClick="toggle('mat_span','bril_span')" >
  <br><br>
  <input type="radio" name="pap" value="bril"
onClick="toggle('bril_span','mat_span')" >
  </form>
  </td>


  <td> Mat <br><br>
   Brillant <br> <br></td>

  <td  align="right">

  <span id="mat_span"
style="visibility:hidden;position:relative;top:0;left:0">
  <form name="form3">
   <select name="gram_mat" >
                  <option selected>100g
                  <option>120g
                  <option>160g
                  <option>200g
                  <option>250g
   </select>
  </form>
  </span>


  <span id="bril_span"
style="visibility:hidden;position:relative;top:0;left:0">
  <form name="form4">
   <select name="gram_bril" >
                  <option selected>120g
                  <option>140g
                  <option>170g
                  <option>210g
   </select>
  </form>
  </span>


  </td>
 </tr>

 </table>

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *