• Steve Harris 34
  • NEWBIE
  • 25 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

 

Hi community,

 

I have a button on which I want to include a warning message, that is, when the user clicks on the button, a message appears asking if he/she wants to continue...

 

This is where I have gotten so far, when I click on the button I do have the message popping up and asking if I want to continue, however the change() action is called even if I close this window...I want the processing to take place only if the user clicks OK...

 

Thanks you!

 

 

<apex:page controller="HelloWorld">

<apex:form >
<apex:commandButton value="Warning" onclick="javascript&colon;window.alert('Do you want to proceed?');" action="{!change}"/>
</apex:form>

</apex:page>

 

  • November 27, 2013
  • Like
  • 0