You need to sign in to do that
Don't have an account?
AK_Smith
Run script only if checkbox field checked
Hello! how to run skript only if checkbox Project__c.check__c is checked
<script> var int=self.setInterval(function(){callActionFunction()},200); function callActionFunction(){ ActionFunctionName(); } </script>
So, We need to access direct value in javascript through expression like below: Above script must work for you.
Thanks
All Answers
Try below snippet:
Please like the answer and mark it as best if this helps.
Thanks,
Aman
Nope. Its not working
maybe i need to use field ID from the record?
like var x = document.getElementsByClassName('Project__c.geo__c')[0].checked;
works if i use var x = true/false. so the problem is in this part
Kindly make sure you paste whole of the snippet in your page.
For your info, I updated one of apex:inputfield in the code before like below:
<apex:inputField id="geo" styleClass="geo" value="{!Project__c.geo__c}" />
Thanks
- Is this field rendered as read only on your vf page?
- Is this field being shown on your vf page? If yes, what is the value in it?
- reed only
- yes shown and marked as checked reed only
So, We need to access direct value in javascript through expression like below: Above script must work for you.
Thanks
Kindly mark my answer as best if that helped.
Thanks
Aman