Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Javascript query and app alert message

Avatar

Level 2

Hi there,

I wonder if someone could please help with a query I have re a button I have that checks that all required fields have been completed? If required fields are not completed one message is displayed and when all required fields have been completed another message is displayed. I'm a scriptingnovice but have sort of figured out what I want to do (it seems to work anyway!) . The problem I have now is that I want to change the text in the app alert from "Warning: Javascript Window". Is this possible? I'd also like to remove the big x from the app alert when all fields have been completed and the button is clicked by the user. Please find my script below.

Any advice and help would be much appreicated.

Thanks,

Ken

form1.#subform[0].#area[0].Button1::click - (JavaScript, client)

if (form1.execValidate() == false){

     app.alert("You have not completed out all of the required fields of the form. Please complete the required fields.")
     
}
if (form1.execValidate() == true){

     app.alert("You have completed all of the required fields. Please proceed to submit this form by email.")

0 Replies

Avatar

Level 10

Switch to the XFA scripting model (xfa.host.messageBox) from the Acroform scripting model (app.alert). You can alter the dialogue box title and icons (although I think you can with app.alert but I cannot remember).

See http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm. Drill into the help. The messageBox object is explained in Scripting Methods.

Untitled.png

Steve

Avatar

Level 2

Thanks for the quick reply Steve. Help from a fellow gooner is always appreciated!!

Avatar

Level 10

You're welcome. Counting the days to Anfield.