XdConfirmChoice question

C

ChrisB

I have the following code for a submit button that I added to my form. I
would like to verify with the user that they are ready to submit, but I am
having trouble getting the code to work correctly based on the user response.
I always seem to get the message "You answered no" from the code. What am I
missing?

function submit_button::OnClick(eventObj)
{

XdConfirmChoice = XDocument.UI.Confirm("Are you ready to submit the
invoice?",4);

if (XdConfirmChoice.xdYes)
{
XDocument.UI.Alert("You answered yes!");
}
else
{
XDocument.UI.Alert("You answered no!");
}
}
 
C

ChrisB

Anton, when I try your example, I get error "XDConfirmChoice is undefined".
How do I prevent that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top