You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jim O'Callaghan <ji...@peritussolutions.com> on 2010/08/04 16:09:11 UTC

Can anyone advise on a good approach for IE's handling of the <button> tag?
I was using:

 

<a
href="${returnPage}"><button>${message:generic.continue-label}</button></a>

 

. 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. 


Re:

Posted by Andreas Andreou <an...@di.uoa.gr>.
@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,  <RW...@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" <jc...@yahoo.co.uk>
> To:     "'Tapestry users'" <us...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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.virtanen@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-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
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Tapestry PMC / 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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 PMC / 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
> http://www.boystown.com.au
> http://www.kidshelp.com.au
>
>
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry PMC / 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:

Posted by RW...@boystown.com.au.
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" <jc...@yahoo.co.uk>
To:     "'Tapestry users'" <us...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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.virtanen@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-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
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry PMC / 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
>
>
>
> ---------------------------------------------------------------------
> 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 PMC / 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



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



http://www.boystown.com.au 
http://www.kidshelp.com.au




Re:

Posted by Kalle Korhonen <ka...@gmail.com>.
The way I did it just for IE was to stop the event and open the same
url via javascript. It's unbelievable what hoops you have to go
through for IE support. I certainly would use regular submits and
links if I have a choice while wishing for IE's quick but painful
death.

Kalle


On Thu, Aug 5, 2010 at 8:33 AM, Jim O'Callaghan <jc...@yahoo.co.uk> wrote:
> Thanks Michael.  I've decided against using it also, and am sticking with
> submits and styled anchors.
>
> Regards,
> Jim.
>
> -----Original Message-----
> From: Michael Gentry [mailto:mgentry@masslight.net]
> Sent: 05 August 2010 14:54
> To: Tapestry users
> Subject: Re: <button> for IE
>
> I'm jumping into this quite late ...
>
> About a year ago I tried using the BUTTON tag, but IE made it pretty
> impossible for us.  We had multiple buttons in a form and with IE (at
> least IE 6) we couldn't identify which button was clicked on.  We had
> to go back to a normal submit button.  I'm not sure if this
> restriction will impact you, but thought I'd mention it.
>
> mrg
>
> ---------------------------------------------------------------------
> 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
>
>

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


RE:

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
Thanks Michael.  I've decided against using it also, and am sticking with
submits and styled anchors.

Regards,
Jim.

-----Original Message-----
From: Michael Gentry [mailto:mgentry@masslight.net] 
Sent: 05 August 2010 14:54
To: Tapestry users
Subject: Re: <button> for IE

I'm jumping into this quite late ...

About a year ago I tried using the BUTTON tag, but IE made it pretty
impossible for us.  We had multiple buttons in a form and with IE (at
least IE 6) we couldn't identify which button was clicked on.  We had
to go back to a normal submit button.  I'm not sure if this
restriction will impact you, but thought I'd mention it.

mrg

---------------------------------------------------------------------
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:

Posted by Michael Gentry <mg...@masslight.net>.
I'm jumping into this quite late ...

About a year ago I tried using the BUTTON tag, but IE made it pretty
impossible for us.  We had multiple buttons in a form and with IE (at
least IE 6) we couldn't identify which button was clicked on.  We had
to go back to a normal submit button.  I'm not sure if this
restriction will impact you, but thought I'd mention it.

mrg

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


RE:

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
Kalle, Roland et al.,

Thanks for all the suggestions.  I don't want to pollute the list much more
with this query as I have a cross-browser solution that I'm happy with (CSS
applied to the anchor), but during my testing, even if I stopped the event
using:
onclick="return false;" IE wouldn't navigate to the href indicated by the
anchor.

Regards,
Jim.

-----Original Message-----
From: Kalle Korhonen [mailto:kalle.o.korhonen@gmail.com] 
Sent: 04 August 2010 23:30
To: Tapestry users
Subject: Re: <button> for IE

On Wed, Aug 4, 2010 at 2:32 PM, Jim O'Callaghan <jc...@yahoo.co.uk>
wrote:
> The behavior I was finding was as follows:
> 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.

Nine times out of ten IE is the offender and that's true in this case
as well. If the button is on a form IE submits the form which is
incorrect according to the spec. IE8 may have this right. Need to do
what Roland says and stop the event.

Kalle


> -----Original Message-----
> From: andreoua@gmail.com [mailto:andreoua@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 <jc...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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.virtanen@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-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
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Tapestry PMC / 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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 PMC / 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
>
>
>
> ---------------------------------------------------------------------
> 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


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


Re:

Posted by Kalle Korhonen <ka...@gmail.com>.
On Wed, Aug 4, 2010 at 2:32 PM, Jim O'Callaghan <jc...@yahoo.co.uk> wrote:
> The behavior I was finding was as follows:
> 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.

Nine times out of ten IE is the offender and that's true in this case
as well. If the button is on a form IE submits the form which is
incorrect according to the spec. IE8 may have this right. Need to do
what Roland says and stop the event.

Kalle


> -----Original Message-----
> From: andreoua@gmail.com [mailto:andreoua@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 <jc...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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.virtanen@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-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
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Tapestry PMC / 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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 PMC / 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
>
>
>
> ---------------------------------------------------------------------
> 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:

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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.virtanen@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-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
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry PMC / 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
>
>
>
> ---------------------------------------------------------------------
> 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 PMC / 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



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


Re:

Posted by Andreas Andreou <an...@di.uoa.gr>.
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 <jc...@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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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.virtanen@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-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
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry PMC / 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
>
>
>
> ---------------------------------------------------------------------
> 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 PMC / 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:

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
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: andreoua@gmail.com [mailto:andreoua@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 <jc...@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.virtanen@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-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
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry PMC / 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



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


Re:

Posted by Andreas Andreou <an...@di.uoa.gr>.
oops, i meant to say that action should be set to the url of the returnPage

On Wed, Aug 4, 2010 at 20:50, Andreas Andreou <an...@di.uoa.gr> wrote:
> 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 <jc...@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.virtanen@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-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
>>
>>
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry PMC / Tacos developer
> Open Source / JEE Consulting
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry PMC / 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:

Posted by Andreas Andreou <an...@di.uoa.gr>.
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 <jc...@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.virtanen@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-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
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry PMC / 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:

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
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.virtanen@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-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:

Posted by Ville Virtanen <vi...@cerion.fi>.
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re:

Posted by Ville Virtanen <vi...@cerion.fi>.
I rolled a component that uses the IE specific tag to render normal button if
the used browser is less than IE 8. (IE 8+ handles it correctly)

That wasn't the greatest solution, but it worked. Also it only matters when
you have more than one button in the form, so single button forms can be
implemented as if it works ok in ie.

 - Ville

<!--[if lt IE 8]>Less than IE 8 submit<![endif]-->
<![if !lt IE 8]>IE8 or greater or non-ie browser button<![endif]>


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-tp29346696p29347648.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


RE:

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
Thanks Dragan but I need to make sure it works without JS - no choice.

Regards,
Jim.

-----Original Message-----
From: Dragan Sahpaski [mailto:dragan.sahpaskix@gmail.com] 
Sent: 04 August 2010 15:35
To: Tapestry users
Subject: Re: <button> for IE

I use,

<input type="submit" onclick="window.location='${url}'; return false;"
value="${value}" />

Cheers

On Wed, Aug 4, 2010 at 4:09 PM, Jim O'Callaghan
<ji...@peritussolutions.com>wrote:

> Can anyone advise on a good approach for IE's handling of the <button>
tag?
> I was using:
>
>
>
> <a
>
href="${returnPage}"><button>${message:generic.continue-label}</button></a>
>
>
>
> . 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.
>
>


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


Re:

Posted by Dragan Sahpaski <dr...@gmail.com>.
I use,

<input type="submit" onclick="window.location='${url}'; return false;"
value="${value}" />

Cheers

On Wed, Aug 4, 2010 at 4:09 PM, Jim O'Callaghan <ji...@peritussolutions.com>wrote:

> Can anyone advise on a good approach for IE's handling of the <button> tag?
> I was using:
>
>
>
> <a
> href="${returnPage}"><button>${message:generic.continue-label}</button></a>
>
>
>
> . 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.
>
>