You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Paul Stanton <pa...@gunnsoft.com.au> on 2008/06/03 06:19:26 UTC

T4: Async submit client side listeners

Hi all,

I've got a form which is submitted asynchronously as follows:

<form jwcid="myForm@Form" listener="listener:process" async="true">
    <input jwcid="mySubmit@Submit" selected="ognl:selected" tag="tag" 
value="go"/>
</form>

I can add javascript handling before the form is submitted by adding an 
onclick handler to the submit button, but is there a way to call 
javascript after the form is submitted - ie directly after async request 
has been made?

Thanks, Paul.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4: Async submit client side listeners

Posted by Paul Stanton <pa...@gunnsoft.com.au>.
Thanks, event.connect should work.

Andreas Andreou wrote:
> I think tapestry.form.submit(formId, submitName, parms)
> is called for async submit....
>
> you can dojo.event.connect on it and do stuff when it finishes
>
> On Tue, Jun 3, 2008 at 7:19 AM, Paul Stanton
> <pa...@gunnsoft.com.au> wrote:
>   
>> Hi all,
>>
>> I've got a form which is submitted asynchronously as follows:
>>
>> <form jwcid="myForm@Form" listener="listener:process" async="true">
>>   <input jwcid="mySubmit@Submit" selected="ognl:selected" tag="tag"
>> value="go"/>
>> </form>
>>
>> I can add javascript handling before the form is submitted by adding an
>> onclick handler to the submit button, but is there a way to call javascript
>> after the form is submitted - ie directly after async request has been made?
>>
>> Thanks, Paul.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4: Async submit client side listeners

Posted by Andreas Andreou <an...@gmail.com>.
I think tapestry.form.submit(formId, submitName, parms)
is called for async submit....

you can dojo.event.connect on it and do stuff when it finishes

On Tue, Jun 3, 2008 at 7:19 AM, Paul Stanton
<pa...@gunnsoft.com.au> wrote:
> Hi all,
>
> I've got a form which is submitted asynchronously as follows:
>
> <form jwcid="myForm@Form" listener="listener:process" async="true">
>   <input jwcid="mySubmit@Submit" selected="ognl:selected" tag="tag"
> value="go"/>
> </form>
>
> I can add javascript handling before the form is submitted by adding an
> onclick handler to the submit button, but is there a way to call javascript
> after the form is submitted - ie directly after async request has been made?
>
> Thanks, Paul.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4: Async submit client side listeners

Posted by Kalle Korhonen <ka...@gmail.com>.
cycle.getResponseBuilder().addInitializationScript(this,
"myJavascriptFunction();");

Kalle


On Mon, Jun 2, 2008 at 9:19 PM, Paul Stanton <pa...@gunnsoft.com.au>
wrote:

> Hi all,
>
> I've got a form which is submitted asynchronously as follows:
>
> <form jwcid="myForm@Form" listener="listener:process" async="true">
>   <input jwcid="mySubmit@Submit" selected="ognl:selected" tag="tag"
> value="go"/>
> </form>
>
> I can add javascript handling before the form is submitted by adding an
> onclick handler to the submit button, but is there a way to call javascript
> after the form is submitted - ie directly after async request has been made?
>
> Thanks, Paul.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>