Re: Javascript is not called by AjaxSubmitButton
Re: Javascript is not called by AjaxSubmitButton
- Subject: Re: Javascript is not called by AjaxSubmitButton
- From: Kalpana Vaka <email@hidden>
- Date: Fri, 23 Apr 2010 10:27:48 +0530
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@hidden> 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 > <input type="text" name="field1"/>
<wo:submit action="" value="Post Data"/>
</wo:form>
Case 2: AjaxSubmitButton
<wo:form>
<input type="text" name="field1"/>
<wo:AjaxSubmitButton action="" value="Post Data" >
</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@hidden)
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden