Expand my Community achievements bar.

Need JavaScript /FormCalc code to show multiple messages in popup

Avatar

Former Community Member
Hi,



I need the scripting code to show the multiple messages in a popup, I know the method XFA.HOST.MESSAGEBOX() which only shows one message at a time.



My requirement is I am consuming a web service hosted in SAP using Adobe Lifecycle Designer in my Adobe form. This web service will return messages in a table format, I need to show all of these messages in a single popup when the user clicks a button.



Thanks,

Basava
2 Replies

Avatar

Former Community Member
Hi Basava,

you can add line breaks in the messagebox.

Is that a possibility for you?

you only have to add a '\n' in the output-text (javascript)

xfa.host.messagebox(field1 + '\n' + field2);

Avatar

Former Community Member
Hi kunzd,



Thanks for your reply.

This got solved using the below code



var cnt = 10

var mystr

var newline = "\u000a"



for i=0 upto cnt do

mystr = Concat(mystr, "Message ", i, newline)

endfor



xfa.host.messageBox(mystr)



Thanks,

Basava