You need to sign in to do that
Don't have an account?
How to eliminate special character ?
Good day,
I need to invoke ajax call when user tick on checkbox, below is the code
<apex:inputCheckbox value="{!myvalue}" rendered="{!hasField}" onclick="{! 'javascript:if(document.getElementById('myField') == null){alert('Message call');} else { handleClicked();} '}}" />
When i put in this and save, it prompt me error on missing '}' ....i try putting '\' in front of all single quote and it able to save , but it doesn't function when i tick on it
'javascript:if(document.getElementById(\'myField\') == null){alert(\'Message call\');} else { handleClicked();} '
any clue how i can fix it ? Thanks in advance
Hi,
Think this'll work:-
<apex:inputCheckbox value="{!myvalue}" rendered="{!hasField}"onclick="javascript:if(document.getElementById('myField') == null){alert('Message call');} else { handleClicked();}"/>
R.