cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Confirmation box in Interactive form.

Former Member
0 Kudos

Hi Experts,

I am facing a problem using a confirmation box in an interactive form.

below is the script I have in the form, it works fine locally in ADLC preview, but when the form is launched live, its not giving the popup. Strange thing is that after this statement I have the form submittion to SAP, this executes fine. So I can say there is no issue with the script.


//3 = no, 4 = yes.
var response = xfa.host.messageBox("Are you sure you want to submit the Form?", "PO Request- Smart engine - Option", 1 , 2);
if(response == 3}
 // do nothing.
else if (response == 4)
   ///form submittion code.

Thanks in advance for your help.

Cheers,

Sai

Accepted Solutions (1)

Accepted Solutions (1)

yogesh_galphade
Contributor
0 Kudos

hi

check with your browser version or settings. Might scripting is disabled.

Former Member
0 Kudos

Hi Yogesh,

My interactive form is completely dynamic.

And i could see dynamic properties, so there is no issue with script being blocked for sure.

but may be there is a popup blocker, but as said the next statement after this code is working fine.

Cheers,

Sai

Former Member
0 Kudos

Hi,

I unchecked the popup blocker on my web browser and ran in still no success.

Also in the form I have couple of alert message boxes, which they apper properly. so in this case we can say there is no issue with the popup blocker.

If somebody have faced such a problem and if you have the answer please shere it with me.

Thanks & Regards,

Sai

Former Member
0 Kudos

Hi Sai,

I just went through your issue. I don't find any particular reason for this script to not work.

Anyway, is this the exact script in your form or have you put an example code here? I asked because it was not working for me as well when I did a copy-paste of the script into a button click event. The problem was with the "if-elseIf" syntax. When I corrected, it is working fine for me.

I couldn't find any other reasons since the other alerts are working fine in your form.

var response = xfa.host.messageBox("Are you sure you want to submit the Form?", "PO Request- Smart engine - Option", 1 , 2);
if(response == 3){
}
else if (response == 4){
}

Thanks & Regards,

Sanoosh

Former Member
0 Kudos

Hi All,

The issue is resolved, and you don't believe how silly it was.

I had a if condition on a check box whose value is either 0 / 1.

In ADLC it always returns 0 / 1, but when is opend in sap the same form return null for this checkbox, may be when the check box is initialised or published for the 1st time. but at the same circumstances ADLC preview gives 0.

Thanks for the suggestions.

cheers,

sai

Answers (0)