Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Help with Error: $host does not have a method 'messageBox'

Avatar

Level 2

Greetings Everyone:

I get this error in my Log window:

Error: $host does not have a method 'messageBox'

I'm calling xfa.host.messageBox("MyMessage") from form's initialize event.

What am I doing wroing?

Acrobat Pro 9 - Java Script is enabled.

Thanks in advance,

iL

4 Replies

Avatar

Former Community Member

Check the type of script you are using on the event.

FormCalc

$xfa.host.messageBox("OK");

JavaScript

xfa.host.messageBox("OK");

Steve

Avatar

Level 2

Hi Steve:

It's set to JavaScript. It's also set as the from's default script.

I also can't find: xfa.layout from my 'intellisense' dropdown.

WTF?

Thanks for your reply.

iL

Avatar

Former Community Member

I cannot replicate the xfa.host.messageBox problem. I tested FormCalc and JavaScript and they both fired on form initialize. Which version of Designer do you have? See Help > About LiveCycle Designer ES.

The intellisense is not completely aware of the XFA model so there are gaps.

Avatar

Level 2

Hi Steve:

Thanks for your prompt responses. I appreicate that. I got the latest version.

I'm OT on at home looking for more answers...I'm guessing it's an installation issue...

I even tried console.println("Message"); CTRL + J and blank. I did this on Acrobat and LC.

I'm gonna do a full unistnall and reinstall when I get back to office.

The software is coming from our IS dept so I know it's squeaky clean.

I did an Installer Repair but the problem has returned.

I also can't use/access any xfa.layout memebers....

I get this errors even on newly created forms...it hasn't crashed again so I can't get any bucket ID log yet.

Here's whats on my office box that giving me grief:

LC version 8.2.1.4029.1.523496

Acrobat Pro 9

Java Version 6 Update 15

OS Platform: (HP Box)

SQL Server 2008 Express (HotFix installed)

VS2008,Office2k7.

XP SP3

iL