You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by John <jo...@quivinco.com> on 2013/02/24 08:59:56 UTC

button tag

Is it possible for a button tag outside a form to trigger an action? Something like this and still have the GUI as a button? Having to have a form for just an action off a button seems excessive. And sometimes I'd like a real button instead of a link.

<button type="button">Click Me!</button>

Re: button tag

Posted by Bob Harner <bo...@gmail.com>.
You could just use a regular pagelink, actionlink or event link and
style it (with CSS) to look like a button.

If you really want to use a <button> element, you can. But you'll have
to decide out how to get the Tapestry-generated URL to the browser,
with a JavaScript click event handler. Maybe get the link from
ComponentResources#createEventLink, add it as an HTML5 "data"
attribute to the button element, using JavaScript to pull out the data
value when clicked.

http://tapestry.1045711.n5.nabble.com/Create-a-component-event-link-for-another-page-td3351100.html


On Sun, Feb 24, 2013 at 8:05 AM, based2 <ba...@free.fr> wrote:
> http://www.w3schools.com/tags/tag_input.asp
>
> <input> elements are used within a <form> element to declare input controls
> that allow users to input data.
>
> ==
>
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html
>
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/ActionLink.html
>
> http://tapestry.apache.org/component-reference.html#ComponentReference-LinksandButtons
>
> http://tapestry5-jquery.com/mixins/docsbutton?t:lb=t
>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/button-tag-tp5720185p5720187.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
>


On Sun, Feb 24, 2013 at 8:05 AM, based2 <ba...@free.fr> wrote:
> http://www.w3schools.com/tags/tag_input.asp
>
> <input> elements are used within a <form> element to declare input controls
> that allow users to input data.
>
> ==
>
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html
>
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/ActionLink.html
>
> http://tapestry.apache.org/component-reference.html#ComponentReference-LinksandButtons
>
> http://tapestry5-jquery.com/mixins/docsbutton?t:lb=t
>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/button-tag-tp5720185p5720187.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: button tag

Posted by based2 <ba...@free.fr>.
http://www.w3schools.com/tags/tag_input.asp

<input> elements are used within a <form> element to declare input controls
that allow users to input data.

==

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/ActionLink.html

http://tapestry.apache.org/component-reference.html#ComponentReference-LinksandButtons

http://tapestry5-jquery.com/mixins/docsbutton?t:lb=t




--
View this message in context: http://tapestry.1045711.n5.nabble.com/button-tag-tp5720185p5720187.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: button tag

Posted by John <jo...@quivinco.com>.
I envisage something like this:

<button type="button" onclick="do:page.onActionEvent" t:context=".../>
  ----- Original Message ----- 
  From: John 
  To: users@tapestry.apache.org 
  Sent: Sunday, February 24, 2013 7:59 AM
  Subject: button tag


  Is it possible for a button tag outside a form to trigger an action? Something like this and still have the GUI as a button? Having to have a form for just an action off a button seems excessive. And sometimes I'd like a real button instead of a link.

  <button type="button">Click Me!</button>