get the id of the previous field in javascript
<pre><code>&lt;td&gt;
            &lt;select name="ad_category" id = "ad_category" onchange="select_sub_cat(this.value)" &gt;
                &lt;option value="#"&gt;&lt;/option&gt;
                &lt;option value="jobs" id="jobs"&gt;Jobs&lt;/option&gt;
                &lt;option value="sales" id="for_sale"&gt;For sale&lt;/option&gt;
                &lt;option value="services" id="services"&gt;Services&lt;/option&gt;
                &lt;option value="real_estate" id="real_e"&gt;Real estate/housing&lt;/option&gt;    
            &lt;/select&gt;
        &lt;span id="cat_help"&gt;&lt;a href=""&gt;Help&lt;/a&gt;&lt;/span&gt;
        &lt;/td&gt;
</code></pre>

<p>IN the above code , in <code>&lt;a href=""&gt;</code> I want to pass the id or any information of the option selected , so that clicking on help will show only the help for the particular option . But my question is is it possible to get the id of the option selected ?</p>
