The objective of this problem is to pop a warning message if user hit submit button with no address and take no action, but the problem is submit button don't have click event.
I am checking a address field, if the address field has some value then it should proceed to submit the form, otherwise it should popup a message and don't take any action.
Form.#pageSet[0].Page1.FOOTER_EN_FRAGMENT.FSSUBMIT_PC::mouseUp - (JavaScript, client)
var addr1 = HEADER_EN_FRAGMENT.CUSTOMER_ML_ADDRESS_1.rawValue;
var addr2 = HEADER_EN_FRAGMENT.CUSTOMER_ML_ADDRESS_2.rawValue;
if(addr1 == null || addr1 == "" || addr2 == null || addr2 == "")
{
app.alert("Address field can't be blank!",3);
FSSUBMIT_PC.validate = "disable";//need help here
}
Right now its just displaying the error message, but still submitting when button is click. I want it to take no action but I don't know how to do that in adobe livecycle designer.
Also please tell me if there is any other way to pop up error message other than app alert.
Thanks in advance!