You need to sign in to do that
Don't have an account?
Amita Tatar
I have pasted my code here. The problem i am facing is that the alert is not showing any value when the oncomplete event occurs.Pl help
oncomplete alert not showing any value
<apex:page> <apex:form > <apex:pageBlock title="Order Create/Edit"> <apex:actionRegion > <apex:pageBlockSection title="Account Information"> <apex:inputField value="{!order.AccountId}" id="exname"> <apex:actionSupport event="onchange" action="{!AccountPopulated}" oncomplete="grabExName();" rerender="accinfo, msgs"/> </apex:inputField> <apex:outputField id="messageText" value="{!order.Account.Message__c}"/> <!--<apex:variable var="new" value="{!order.Account.Message__c}"/> --> </apex:pageBlockSection> </apex:form> <apex:page>Hi,
I have pasted my code here. The problem i am facing is that the alert is not showing any value when the oncomplete event occurs.Pl help
<apex:page id='pgId'>
<apex:form id='frmId'>
<apex:pageBlock title="Order Create/Edit" id = 'pbId'>
<apex:actionRegion >
<apex:pageBlockSection title="Account Information" id= 'pbsId'>
<apex:inputField value="{!order.AccountId}" id="exname">
<apex:actionSupport event="onchange" action="{!AccountPopulated}" oncomplete="grabExName();" rerender="accinfo, msgs"/>
</apex:inputField>
<apex:outputField id="messageText" value="{!order.Account.Message__c}"/>
<!--<apex:variable var="new" value="{!order.Account.Message__c}"/> -->
</apex:pageBlockSection>
</apex:form>
<script type="text/javascript">
function grabExName()
{
//alert('{!$Component.messageText}');
var text = document.getElementById('pgId:frmId:pbId:pbsId:messageText').value;
alert(text);
}
</script
<apex:page>