You need to sign in to do that
Don't have an account?
Sravanthi G
how to get selected value from the picklist using javascript from visualforce page
how to get selected value from the picklist using javascript from visualforce page
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
If you want the current value stored in the database, use ajax request to query using the current id or if you want the current value selected but not saved yet, use the element id by inspecting the field value not the most recommended way. Java script functions can be used in action function and using this you can pass the current object variable as
{!object.picklistfieldvalue} in the params of the action function and continue what you want to do.
Hope it helps
RD
Ex :<apex:selectList styleClass="pickVal" size="1" onchange="callMe();">
JS Code:
function callMe() {
var a = document.getElementsByClassName('pickVal')[0].value;
alert(a);
}
</script>
Try like this..