function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swamy P R NSwamy P R N 

how to find a index value from select list

Hi folks,

i have a small issue with finding value from selectoptions.i.e, from the URL am getting a value.Now i need to search this value in an select list(<select>) and i need to know the index of the particular value.

VF :These are select list

<select id="timeperiodname" onchange="doSearch();" >
        <option value=""></option>
        <apex:repeat value="{!allperiods}" var="accnt">
          <option value="{!accnt.name}">{!accnt.name}</option>
        </apex:repeat>
          <option value="H1">H1</option>
          <option value="H2">H2</option>
          <option value="F1">F1</option>
</select>

From the URL,am getting " H1 ".Now i need to search this value in select list and i need to find the index of the particular value.

how can i achieve this?plz,suggest me..
Ashish_SFDCAshish_SFDC
Hi Swamy, 


See the links below which have sample code for passing Selected Picklist Values,

http://www.infallibletechie.com/2013/03/how-to-send-picklist-values-from-one-vf.html

https://developer.salesforce.com/forums?id=906F00000009886IAA


Regards,
Ashish