+ Start a Discussion
ksmoksmo 

onclick if condition on the div element

On the click of this checkbox it should bring a popup but based on a condition.


<input id="showprompt" type="checkbox" name="Name" value="Name "onclick="if({!item.name='test'),ShowPrompt(this.checked)" />

I want the correct syntax
Prosenjit Sarkar 7Prosenjit Sarkar 7
Hi ksmo, 

Can you try this out, 
 
<input id="showprompt" type="checkbox" name="Name" value="Name" onclick="if('{!item.name}'=='test') {ShowPrompt(this.checked);} else return false;" />

Thanks,
Prosenjit