0

I have 5 inputtext I want to add the value of all the inputtext to a outputtext. I dont want any action to be done on the button click. I need when the value of the 1st and 2nd inputtext is entered then it should get added, same as with 5 inputtext. I want it should work on value change of inputtext.

1

You may use Onchange event of the inputText to call an action function.

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputText.htm

Refer the above and call the action function on the Onchange event and refer the below document to understand how you can call action function by binding with Id of the component

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm

0

I would try it with jQuery:

<apex:inputField value="Object.Field__c" styleClass="inputField1">
...
<apex:outputText value="..." styleClass="outputField">

<script>
    jQuery('.inputField1').change(function(){
        jQuery('.outputField').val(jQuery(this).val());
    });
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.