Hi All, Please find the enclosed compressed file with the sample application that depicts the Java script problems with AjaxSubmitButton.
The application has the following components.
1) One *Text field*
2) One *WOActiveImage* Button
3) Two *AjaxSubmit**Buttons ("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 *onClick*ing 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.
TestApp.rar
Description: Binary data
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
