Hi All,
Please find the enclosed compressed file with the sample application that depicts the _javascript_ problems with AjaxSubmitButton.
The application has the following components.
1) One Text field
2) One WOActiveImage Button
3) Two AjaxSubmitButtons ("Save" & "SecondSave")
4) _javascript_ file that is being used for calling script validations from WOComponent (gen_validatorv2.js).
When we click on WOActiveImage without entering anything in the text box then, _javascript_ validation is being executed onClicking the button and form is not getting submitted until we enter valid value in it. It is working fine.
And for AjaxSubmitButton1 also, same _javascript_ function has been given for onClick event binding. But, the validation is not getting fired and we are not seing alert window.
For both of the above Submit buttons, _javascript_ validations from gen_validatorv2 file are being called.
And for AjaxSubmitButton2, different _javascript_ function is binded to onClick event. This _javascript_ function is not calling any of the methods in gen_validatorv2.js. In this case, we are getting the alert with the validation message. But, form is getting submitted on clicking on the OK button in the alert box.
So, finally the issues with AjaxSubmitButtons are summarized below.
1) When we use external _javascript_ file (gen_validatorv2.js), we are not getting alert window with the validation failure message and action method is being called.
2) When we write _javascript_ function in the WOComponent itself, we are getting alert with the validation failure message. But, the action method is being called in case of validation failure too.
Any help in resolving this issue?
Thanks & Regards,
Kalpana.