You need to sign in to do that
Don't have an account?
Swetha Sfdc1
dynamically calculate the sum of 2 text fields using java script
Hi Friends thanks in advance,
I have 3 custom objects named ( object1__c, Object2__c, Object3__c) with the controller named (Checking). I had wrote a code for dynamically adding of text fields when user enter add button on vfpage. I need object1__c+Object2__c should be displayed in Object3__c . I have used jquery and javascript but it is not reflecting in new fields when I Click add button.
Thanks,
Swetha
I have 3 custom objects named ( object1__c, Object2__c, Object3__c) with the controller named (Checking). I had wrote a code for dynamically adding of text fields when user enter add button on vfpage. I need object1__c+Object2__c should be displayed in Object3__c . I have used jquery and javascript but it is not reflecting in new fields when I Click add button.
Thanks,
Swetha
Please see example below
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
I have placed the code what you have given but it is not refleting in third field.
Thanks,
Swetha
Can you share a bit of code? or you can try to catch error in brouser dev console, if u use Chrome press F12.
Thanks,
Alex
Please try with the below code : Let me know if there is any issue.
Thanks,
Abhishek
I am working on this Code https://developer.salesforce.com/forums/?id=906F00000005FpSIAU.
I need above functionality in this code.
Thanks,
Swetha
what is Component here in this line:-
<input type="button" onclick="sum('{!Component.field1}','{!Component.field2}')">Add</input>