Tuesday, 15 March 2011

javascript - override picklist value in visualforce page -



javascript - override picklist value in visualforce page -

i using picklist in visualforce page, through apex:inputfield in form. saving value in custom object. , value beingness saved in object. when open record in same form (visualforce page). when form beingness loaded saved value there. when form has been loaded, value become null , --none-- selected.

i tried utilize javascript alert, showing right value. couldn't find out issue.

i have used below code:

<apex:pageblocksectionitem id="menopausal_statusitem"> <apex:outputtext value="menopausal status:" /> <apex:outputpanel > <apex:inputfield value="{!msd.ageval__c}" id="agevalid" label="" style="display:none;"/> <apex:inputfield value="{!msd.menopausal_status__c}" id="menopausal_status" required="true"/> </apex:outputpanel> </apex:pageblocksectionitem> <!--<script> alert('{!msd.menopausal_status__c}'); alert(document.getelementbyid('pageid:formid:pageblockid:pageblocksectionid:menopausal_statusitem:menopausal_status').value); </script> -->

this dependent picklist (msd.menopausal_status_c) , controlling pick list msd.ageval_c.

please help me. in advance.

i think has dependent pick lists. have value in ageval__c? if not, menopausal_status__c might not correctly rendered when loading in visualforce page.

you verify temporarily making controlling pick list visibility, check content.

javascript html salesforce apex-code visualforce

No comments:

Post a Comment