You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Tan CyberT@n" <qu...@gmail.com> on 2008/07/10 17:55:27 UTC

[T5] is there any way to use actionlink to call submit from outside of FORM?

hi,

i have an actionlink outside the form. like below


<t:actionlink t:id="toolbarSave" t:zone="zoneFormView" ><img
src="images/saveRecord16.png" /></t:actionlink>
<form >
...................
<input type=submit  t:type="submit" value="submit">
................
</form>

and, is there any way to call from actionlink to call submit from the FORM?
thank you.


Regards,
Cyber

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


Re: [T5] is there any way to use actionlink to call submit from outside of FORM?

Posted by "Tan CyberT@n" <qu...@gmail.com>.
thanks for your reply.  I will try it out :)

On Fri, Jul 11, 2008 at 1:41 AM, Josh Canfield <jo...@thedailytube.com> wrote:
>>
>> is there any way to call from actionlink to call submit from the FORM?
>> thank you.
>>
>
> You can either submit the form, or follow the actionlink. If you want the
> action to be performed when the form is submitted then add the
> functionality/method call to one of the form event handlers.
>
> Then you can use prototype's Event to watch for a click on the link and
> submit the form.
>
> <a href="#" id="toolbarSave" ><img src="images/saveRecord16.png" /></a>
> <t:form t:id="YOUR_FORM_ID" t:zone="zoneFormView">
> ...................
> <input type=submit  t:type="submit" value="submit">
> ................
> </t:form>
>
> <script>
> Event.observe('toolbarSave', 'click', function()
> {$('YOUR_FORM_ID').submit(); return false;});
> </script>
>
> I didn't run this, so you might need to play with it to make it work.
>
> Josh
>
>
> On Thu, Jul 10, 2008 at 8:55 AM, Tan CyberT@n <qu...@gmail.com>
> wrote:
>
>> hi,
>>
>> i have an actionlink outside the form. like below
>>
>>
>> <t:actionlink t:id="toolbarSave" t:zone="zoneFormView" ><img
>> src="images/saveRecord16.png" /></t:actionlink>
>> <form >
>> ...................
>> <input type=submit  t:type="submit" value="submit">
>> ................
>> </form>
>>
>> and, is there any way to call from actionlink to call submit from the FORM?
>> thank you.
>>
>>
>> Regards,
>> Cyber
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>

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


Re: [T5] is there any way to use actionlink to call submit from outside of FORM?

Posted by Josh Canfield <jo...@thedailytube.com>.
>
> is there any way to call from actionlink to call submit from the FORM?
> thank you.
>

You can either submit the form, or follow the actionlink. If you want the
action to be performed when the form is submitted then add the
functionality/method call to one of the form event handlers.

Then you can use prototype's Event to watch for a click on the link and
submit the form.

<a href="#" id="toolbarSave" ><img src="images/saveRecord16.png" /></a>
<t:form t:id="YOUR_FORM_ID" t:zone="zoneFormView">
...................
<input type=submit  t:type="submit" value="submit">
................
</t:form>

<script>
Event.observe('toolbarSave', 'click', function()
{$('YOUR_FORM_ID').submit(); return false;});
</script>

I didn't run this, so you might need to play with it to make it work.

Josh


On Thu, Jul 10, 2008 at 8:55 AM, Tan CyberT@n <qu...@gmail.com>
wrote:

> hi,
>
> i have an actionlink outside the form. like below
>
>
> <t:actionlink t:id="toolbarSave" t:zone="zoneFormView" ><img
> src="images/saveRecord16.png" /></t:actionlink>
> <form >
> ...................
> <input type=submit  t:type="submit" value="submit">
> ................
> </form>
>
> and, is there any way to call from actionlink to call submit from the FORM?
> thank you.
>
>
> Regards,
> Cyber
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.