Expand my Community achievements bar.

SOLVED

Message Box variable

Avatar

Level 5

I have the code:

xfa.host.messageBox("Are you ready to submit this document via email?","",4,2);

if (nResponse == 4)

{//script;}

else

{//script;}

Javascript Console gives an error when "Yes" or "No" is selected.

ReferenceError: nResponse is not defined

3:XFA:form1[0]:Page1[0]:Buttons[0]:SubmitButton[0]:click

I can understand nResponse is not defined. However what variable am I supposed to compare the number 4 ="YES" too? So the script will move on to the if part of the if statement or else?

I created a button for the document viewer to submit the document via email. Althought the button is not techincally a submit button because it is not labeled submit button on the radio button choice of the "OBJECT" tab.

1 Accepted Solution

Avatar

Correct answer by
Level 5

var nResponse = xfa.host.messageBox("Are you ready to submit this document via email?","",4,2);

...........thankfully it's Friday. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

var nResponse = xfa.host.messageBox("Are you ready to submit this document via email?","",4,2);

...........thankfully it's Friday.