title: How to get Magento attribute option id
body: <p>I am customizing mobile theme for my magento store. I need to implement a search functionality in the front page of my mobile theme. Layered navigation is not there in the default iphone mobile theme. So I had put some piece of code for displaying attributes in a select box and created a search button there. I was successful in publishing the back end attributes there in a select box but can't able to make a search box functionality with that. When observing magento's layered navigation, i found that layered navigation search is working like creating a dynamic URL with selected attribute <strong>value id</strong>. So i decided to create search just like layered navigation does. But for creating dynamic url it seems to be i need a piece of code for fetching the selected attribute option id. I tried many codes for getting that option id, but was not successful. Any one please gave me a hand.</p>