Hi Farurukh,

Thanks for your help.

My validation script is running on form's "onClick" event. If I write the
javascript directly in the WOComponent, it is getting called by
AjaxSubmitButton.

When we use external js file, then the functions in external js functions
are not getting fired.

Pleae let me know your suggestions to resolve the issue.
Thanks & Regards,
Kalpana.


On 4/23/10, Farrukh Ijaz <[email protected]> wrote:
>
> If you're validation script is running on form's "onSubmit" event. I
> suspect these scripts won't get fired with AjaxSubmitButton however you can
> fire them in onClickBefore event of AjaxSubmitButton and if the script
> returns true the data will be posted to the action E.g.
>
> Case 1: Normal Submit Button
>
> <wo:form onSubmit="someValidations()">
>        <input type="text" name="field1"/>
>        <wo:submit action="$postData" value="Post Data"/>
> </wo:form>
>
> Case 2: AjaxSubmitButton
>
> <wo:form>
>        <input type="text" name="field1"/>
>        <wo:AjaxSubmitButton action="$postData" value="Post Data"
> onClickBefore="someValidation()"/>
> </wo:form>
>
> I hope case 2 would work for you or at least would give some hints. But
> it's better if you could post some code so problem could be understood
> properly.
>
> http://webobjects.insigno.net/wonder/api/er/ajax/AjaxSubmitButton.html
>
> Farrukh
>
> On 2010-04-22, at 8:39 PM, Kalpana Vaka wrote:
>
> > Hi All,
> >
> > I have javascript file validation.js with all the client side validations
> for text, numbers, dates etc.,.
> >
> > When I use WOJavascript with normal submit button, the validations are
> being raised.
> >
> > But, when I use AjaxSubmitButton instead of normal submit button, the
> validations from the js file are being called.
> >
> > Can anyone help me with this?
> >
> > Thanks in advance,
> > Kalpana.
> > _______________________________________________
> > 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/farrukh.ijaz%40fuegodigitalmedia.com
> >
> > This email sent to [email protected]
>
>
 _______________________________________________
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]

Reply via email to