Expand my Community achievements bar.

Javascript query and app alert message

Avatar

Former Community Member

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.")

3 Replies

Avatar

Former Community Member

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

Former Community Member

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

Avatar

Former Community Member

You're welcome. Counting the days to Anfield.