• Aswin B S
  • NEWBIE
  • 10 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
<apex:page controller="PopUp" showHeader="false" standardStylesheets="false" sidebar="false">
    <script>
        function myJavascriptFunc()
        {
            CallApexMethod();
        }
    </script>
    <apex:form >
    <apex:actionFunction name="CallApexMethod" action="{!IF(check,alert('PopUp'),'')"/>
          <apex:pageBlock >
                <apex:pageBlockButtons>
                    <apex:commandButton value="Hit Me" action="{!myActionInController}" onclick="myJavascriptFunc();"/>
                </apex:pageBlockButtons>
          </apex:pageBlock>
    </apex:form>
</apex:page>