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

How do I get current value of select list using javascript

How would I get the value of the select list using javascript section in my visualforce page


<apex:selectList id="queryDurationSelect" value="{!FilterDateValues}" size="1">

<apex:selectOptions value="{!FilterItems}"/>




getFilterDateValues just returns a String[] of the select list values

- Jason 

Best Answer chosen by Admin (Salesforce Developers) 
Your List:

<apex:selectList value="{!FilterDateValues}" size="1" onchange="doSomething(this.value);">

<apex:selectOptions value="{!FilterItems}"/>




function doSomething(value){