@Jim: ok - dont know what the specs say about this either, but i would
expect the
form to be submitted

@RWinter: Jim mentioned earlier he wanted to do this without javascript

On Thu, Aug 5, 2010 at 01:00,  <rwin...@boystown.com.au> wrote:
> Hi
>
> Have you tried an onclick event for the button to stop the event?
>
> <a href="http://asd";><button onclick="return
> false;">labelText</button></a>
>
> I find this works for me when I do not want IE to submit the containing
> Form.
>
> Regards
>
> Roland
>
>
> From:   "Jim O'Callaghan" <jc1000...@yahoo.co.uk>
> To:     "'Tapestry users'" <users@tapestry.apache.org>
> Date:   05/08/2010 07:33
> Subject:        RE: <button> for IE
>
>
>
> Andreas,
>
> The behavior I was finding was as follows:
>
>  - in FF and Chrome <a href="http://asd";><button>labelText</button></a>
> would render the anchor as a button (my desired outcome), and when the
> button was clicked the form was NOT submitted, and the browser navigated
> to
> http://asd
>
>  - in IE <a href="http://asd";><button>labelText</button></a> would render
> the anchor as a button, and when the button was clicked the form was
> submitted - I think <but haven't checked> the value labelText was
> submitted.
>
> Perhaps FF and Chrome are not behaving as the W3C spec mandates though it
> would have suited my purpose.  I was basing the approach on a post on the
> list that I can't find at the moment.
>
> I think other posts came up with the same conclusion I have - leave the
> anchor as is and use CSS to style it.
>
> Regards,
> Jim.
>
> -----Original Message-----
> From: andre...@gmail.com [mailto:andre...@gmail.com] On Behalf Of Andreas
> Andreou
> Sent: 04 August 2010 19:59
> To: Tapestry users
> Subject: Re: <button> for IE
>
> ok, but i have to ask cause that's another new on for me...
> You're saying that if you have
> <a ...><button ...></a> and you click on the button
> that both the form is submitted AND the browser is navigated to the href
> ??
>
> On Wed, Aug 4, 2010 at 21:26, Jim O'Callaghan <jc1000...@yahoo.co.uk>
> wrote:
>> Thanks for the response Andreas.  I want to use an anchor in a scenario
>> where I may have multiple buttons in a form, and want those buttons to
>> submit to form A, but want the anchor to navigate to another page
>> completely.  I think I have what I need with using anchors and some CSS.
>>
>> Regards,
>> Jim.
>>
>> -----Original Message-----
>> From: andre...@gmail.com [mailto:andre...@gmail.com] On Behalf Of
> Andreas
>> Andreou
>> Sent: 04 August 2010 18:50
>> To: Tapestry users
>> Subject: Re: <button> for IE
>>
>> i dont think i've ever seen <button> used inside an <a>
>>
>> what's wrong with doing something like:
>>
>> <form method="get" action="${returnPage}"><button type="submit"
>> ...>...<./button></form>
>>
>> On Wed, Aug 4, 2010 at 19:49, Jim O'Callaghan <jc1000...@yahoo.co.uk>
> wrote:
>>> Thanks Ville.  I will use the pageLink method where the context is
> created
>>> within the java file - the page linked to may also be dynamic, so will
>> also
>>> need to be passed.  A shame IE treats <button> differently.
>>>
>>> Regards,
>>> Jim.
>>>
>>> -----Original Message-----
>>> From: Ville Virtanen [mailto:ville.virta...@cerion.fi]
>>> Sent: 04 August 2010 16:40
>>> To: users@tapestry.apache.org
>>> Subject: Re: <button> for IE
>>>
>>>
>>> On a side note:
>>>
>>> you can use the onAction(possible_context) to catch any action made by
> any
>>> link. Also, you can construct the context for the pagelink (or
> actionlink)
>>> in the java file, just return new Object[]{value1, value2...} from the
>> java
>>> method. (<t:pagelink page="somePage"
> context="prop:myContextMethod">....)
>>>
>>>  - Ville
>>>
>>>
>>> Jim O'Callaghan wrote:
>>>>
>>>> Can anyone advise on a good approach for IE's handling of the <button>
>>>> tag?
>>>> I was using:
>>>>
>>>>
>>>>
>>>>  ${returnPage} <button>${message:generic.continue-label}</button>
>>>>
>>>>
>>>>
>>>> . in my tml with:
>>>>
>>>>
>>>>
>>>> Public Link getReturnPage(){.}
>>>>
>>>>
>>>>
>>>> . in my associated java class until I found IE doesn't behave the same
>> way
>>>> as Chrome / FF.  I am trying to avoid having to provide an
>> onActionFromXYZ
>>>> in my page class as I already have the href I want to navigate to -
> just
>>>> that I want to style it as a button without too much hacking.  I don't
>>>> want
>>>> to put PageLinks in my tml as in this specific case the context is
>>>> variable.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Jim.
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/%3Cbutton%3E-for-IE-tp29346696p29347798.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
>> Tapestry PMC / Tacos developer
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
>
>
> --
> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
> Tapestry PMC / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> 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
>
>
>
> http://www.boystown.com.au
> http://www.kidshelp.com.au
>
>
>
>



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

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

Reply via email to