These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Why does message box not show the message anymore???

djinges
Registered: Jun 27 2007
Posts: 55
Answered

hi folks,

can u tell me why message box doesn't show the message per java script anymore? The problem is following, i have:
- number of defined msgs in script section
- checking plausibility each field and showing error msg at run time, i. g.
xfa.host.messagebox(msg, "Error", 1);
Before updating adobe prof. 8.0 to 8.1 my scripts worked fine but now. The message box appears, but without the error msg, why?

Searching after mistake(s) on my script, i didnt find anything. And it worked before very well.

It'd be nice, if u could tell me why?

Thanks i. a!

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Should look like

Reference_Syntax.messageBox( STRING param1 [, STRING param2 [, INTEGER param3
[, INTEGER param4 ] ] ] )

for example
xfa.host.messageBox("Error",1,0);

you used [b]messagebox[/b] not [b]messagBox[/b]

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

djinges
Registered: Jun 27 2007
Posts: 55
hi radzmar,

thanks for your help!

the mistake i wrote you can ignore, because of auto correction in livecycle designer. My problem is now whereelse:

There are numbers of predefined vars u. a. in my form script object. You can't see the msg text because of not finding reference to the script object.

Trying in enter-event: xfa.host.messageBox(scriptObjID.msgVar, "Error", 1); you will get "undefined" as return value.

Could you tell me why? Again, searching after input misstake(s) I didn't find anything!

SU!!!
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hmm,

I created a script object with name "ID" and defined a variable "Error1" with...

var Error1 = "This is an error message";

Then I put the following script into the enter event of a field...

xfa.host.messageBox(ID.Error1, "Error", 1);

Works!

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs