onlick change the name in drop down box
<p>what i am trying to do is when i click on the submit button and try to get the value it is not displaying it properly . I am writting the code of 2 file down 1) enable.php 2) abc.php</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" style="display:none;"&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
    $PropertyType=$_POST[pr];
    echo $PropertyType;
?&gt;
</code></pre>
