You need to sign in to do that
Don't have an account?

field value +1
Hello! I trying to add +1 to field with the code below. But did not succeed
<script> plus() var a = {!Activity__c.SF1_Attempts__c}; function plus(){ document.getElementById('page:form:Attempts').value = a + 1; } </script> Attempts : <apex:inputField id="Attempts" value="{!Activity__c.SF1_Attempts__c}" />
Also, you should NOT need to run JavaScript for this. As long as it is a number field you could go like this:
{!Activity__c.SF1_Attempts__c+1}
Error: Could not resolve field 'SF1_Attempts__c + 1' from <apex:inputField> value binding '{!Activity__c.SF1_Attempts__c + 1}' in page SF_Geo