Note that there are some explanatory texts on larger screens.

plurals
  1. POdrop down list not appearing again
    primarykey
    data
    text
    <p>I have two radio buttons what I want is that when I select one of them then a drop down list should appear and when other one is marked then drop down list should disappear and instead of it a text message should be displayed.</p> <p>The code for this part is as follows --</p> <pre><code> &lt;head&gt; &lt;script type="text/javascript"&gt; function showhide(r){ var t=r.form['mode']; if (r.value=='none') { t.setAttribute('disabled','disabled'); document.getElementById('data').innerHTML="option not supported"; } else { t.removeAttribute('disabled'); } t.style.display=r.value; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;table&gt; &lt;tr&gt; &lt;td width="400" height="40"&gt;Protocol&lt;/td&gt; &lt;td&gt; &lt;table width="100%" name="table"&gt; &lt;tr&gt; &lt;td style="text-align:center"&gt; &lt;input type="radio" name="protocol" value="" id="opt1" align="left" checked="checked" onclick="showhide(this)" /&gt;opt1 &lt;/td&gt; &lt;td style="text-align:center"&gt; &lt;input type="radio" name="protocol" value="none" id="opt2" align="right" onclick="showhide(this)"/&gt;opt2 &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="400" height="40"&gt;Mode of Operation&lt;/td&gt; &lt;td id="data"&gt; &lt;select name="mode" id="mode"&gt; &lt;option value="opt1"&gt;TCP&lt;/option&gt; &lt;option value="opt2"&gt;UDP&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/bdoy&gt; </code></pre> <p>Now the text message ("option not supported") is displayed once and then it doesn't disappear when switching between the radio buttons and so drop down list doesn't appear again.Where am i getting wrong?? If possible make correction in the code. Please correct me..</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload