You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ca...@ocean7.com on 2004/03/10 23:01:09 UTC

Re: Naming a Hidden field for use by JavaScript

>>>>> On Wed, 10 Mar 2004, "Leif" == Leif Stainsby wrote:

  Leif> Hi,

  Leif> I would like to be able to do this:

  Leif> <span jwcid="@Hidden" value="xxx" name="myHiddenField"
  Leif> id="myHiddenField"/>

  Leif> So I can refer to this field either by id or name.  Unfortunately,
  Leif> Hidden fields appear to use a fixed (or reserved) name, $Hidden, and
  Leif> they do not take informal-parameters, so that nixes 'id' as well.

  Leif> Is there another way to generate a hidden field that you are able to
  Leif> name explicitly? Or am I missing something?

I know it is cheating but if you use the Hidden like this
html
<input jwcid="hiddenId"/>

page
<component id="hiddenId" type="Hidden">
      <binding name="value" expression="someId"/>
</component>

the output has a predictable name
<input type="hidden" name="hiddenId" value="0"/>

Carst


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