This is a generic question
Can I add <apex:commandbutton onclick="if condition? result 1 else result 2">
I would really appreciate a simple example if this is possible.
Thanks in advance
This is a generic question
Can I add <apex:commandbutton onclick="if condition? result 1 else result 2">
I would really appreciate a simple example if this is possible.
Thanks in advance
Best Answer
Check like this for If part use below code
and for else part
Edit --
Goto w3school code editor http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_button_test
and run below code