correct value on printed on next page - onlick
<p>First click on bb link and you will see hello drop down box and click on submit button on next page you will see Hi output , but in fact it should be Hello </p>

<p>when clicked on cc link you will see hi drop down box When submit button is clicked the output still remain the same hi so corrected value is not printed on next page </p>

<p>File Name : enable.php</p>

<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;script type="text/javascript"&gt;
            function showdetail(boxid){
                document.getElementById(boxid).style.display = "block";
            }

            function hidedetail(boxid){
                document.getElementById(boxid).style.display = "none";
           }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;form name="abc" method="post" action="abc.php"&gt;
            &lt;ul&gt;
                &lt;li&gt;&lt;a id="r" href="#" title="" alt="" onclick="showdetail('res'); hidedetail('comm');"&gt;bb&lt;/a&gt;&lt;/li&gt;
                &lt;li style="width: 1px;"&gt;|&lt;/li&gt;
                &lt;li style="width:85px;"&gt;&lt;a id="r" href="#" title="" alt="" onclick="showdetail('comm'); hidedetail('res');"&gt;Cc&lt;/a&gt;&lt;/li&gt;
                &lt;li style="width: 2px;"&gt;|&lt;/li&gt;  
            &lt;/ul&gt;`
            &lt;div id="res"&gt;
                &lt;select id="pr" name="pr" class="textarial12 textcolorgrey flot_left"&gt;
                    &lt;option value="Hello"&gt;Hello&lt;/option&gt;
                &lt;/select&gt;
            &lt;/div&gt;
            &lt;div id="comm" style="display:none;"&gt;
                &lt;select id="pr" name="pr" class="textarial12 textcolorgrey flot_left"&gt;
                    &lt;option value="Hi"&gt;Hi&lt;/option&gt;
                &lt;/select&gt;
            &lt;/div&gt;
            &lt;input type="submit" value="submit" /&gt;
        &lt;/form&gt; 
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>File name : abc.php</p>

<pre><code>&lt;?php

$PrType=$_POST['pr']; 
echo $PrType;    

?&gt;
</code></pre>
