hi, i have found a solution.
http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained

this one maybe can help up

Thank you.
Tan.

On Fri, Dec 12, 2008 at 7:21 PM, Martijn Brinkers <martijn.l...@gmail.com>wrote:

> Could you check if the Event.stop(event) works when used directly from
> the onclick event handler?
>
> So in you page tml file use something like:
>
> <input .... onclick="Event.stop(event); alert('event was stopped');" />
>
> Martijn
>
> On Fri, 2008-12-12 at 03:12 -0800, zack1403 wrote:
> > My component uses Event.stop and it wont actually stop the form submit.
> >
> >
> > Martijn Brinkers (List)-2 wrote:
> > >
> > > I think it's more a prototype issue than a Tapestry issue
> > >
> > > I think you can stop the event with:
> > >
> > > Event.stop(event);
> > >
> > > So your onclick should look something like
> > >
> > > onclick="if(!confirm('Are you sure want to delete?'))
> > > Event.stop(event);"
> > >
> > >
> > > Regards,
> > >
> > > Martijn Brinkers
> > >
> > >
> > > On Fri, 2008-12-12 at 11:25 +0100, Andy Pahne wrote:
> > >> This is sad. We cannot even fill a JIRA, because "Confirm" is not part
> > >> of the framework.
> > >>
> > >> Andy
> > >>
> > >>
> > >>
> > >> zack1403 schrieb:
> > >> > I am using the confirm functionality as a component and am having
> > >> similar
> > >> > problems.  Confirm does not work with the linkSubmit component.  It
> is
> > >> > currently a major bug in my app.
> > >> >
> > >> > Zack
> > >> >
> > >> > Tan cyb...@n wrote:
> > >> >
> > >> >> hi,
> > >> >>
> > >> >> i'm a newbie in  tapestry.  may i know is it possible to do like:
> > >> >>
> > >> >> <t:actionlink t:zone="zoneFormView" t:id="toolbarDel"
> > >> t:context="${id}"
> > >> >> onclick="if(!confirm('Are you sure want to delete?')) return
> > >> >> false;"><button> images/deleteRecord24.png </button></t:actionlink>
> > >> >>
> > >> >> I have tried to put in <button> as well, but after choose cancel.
>  it
> > >> will
> > >> >> still submit.  May i know how to avoid the postback?
> > >> >> Thank you.
> > >> >>
> > >> >> Tan
> > >> >>
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > >> For additional commands, e-mail: users-h...@tapestry.apache.org
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > For additional commands, e-mail: users-h...@tapestry.apache.org
> > >
> > >
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to