You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Gentry <mg...@masslight.net> on 2010/03/10 23:28:40 UTC

[T5.1] t:hidden + id

Hi everyone,

Should the Hidden component preserve the id?  In my TML I have:

<input id="jumpToPage" t:type="Hidden" t:id="jumpToPage" t:value="jumpToPage"/>

However, the generated HTML looks like:

<input type="hidden" name="jumpToPage"/>


Makes it hard to use $('jumpToPage') in my JavaScript to set the value.  :-)

If I switch to:

<input style="display: none;" t:type="TextField" t:id="jumpToPage"
t:value="jumpToPage"/>

It works, but of course, that just feels wrong.  Thoughts?

Thanks in advance,

mrg

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


Re: [T5.1] t:hidden + id

Posted by Michael Gentry <mg...@masslight.net>.
Thanks Josh!  Your tip worked perfectly.

mrg


On Wed, Mar 10, 2010 at 8:03 PM, Josh Canfield <jo...@gmail.com> wrote:
>> Should the Hidden component preserve the id?  In my TML I have:
>
> Probably, but it doesn't. You can look at the source for Hidden and
> it's a very simple component. It doesn't output the id.
>
> You can try this:
>
> var form = $('contact');
> var input = form['jumpToPage'];
>
> from http://www.prototypejs.org/api/form/element/getValue
>
> Josh
>
> On Wed, Mar 10, 2010 at 2:28 PM, Michael Gentry <mg...@masslight.net> wrote:
>> Hi everyone,
>>
>> Should the Hidden component preserve the id?  In my TML I have:
>>
>> <input id="jumpToPage" t:type="Hidden" t:id="jumpToPage" t:value="jumpToPage"/>
>>
>> However, the generated HTML looks like:
>>
>> <input type="hidden" name="jumpToPage"/>
>>
>>
>> Makes it hard to use $('jumpToPage') in my JavaScript to set the value.  :-)
>>
>> If I switch to:
>>
>> <input style="display: none;" t:type="TextField" t:id="jumpToPage"
>> t:value="jumpToPage"/>
>>
>> It works, but of course, that just feels wrong.  Thoughts?
>>
>> Thanks in advance,
>>
>> mrg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> --
> http://www.bodylabgym.com - a private, by appointment only, one-on-one
> health and fitness facility.
> --
> http://www.ectransition.com - Quality Electronic Cigarettes at a
> reasonable price!
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>
> ---------------------------------------------------------------------
> 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: [T5.1] t:hidden + id

Posted by Michael Gentry <mg...@masslight.net>.
If I start using Chenillekit, I'll keep that in mind, Juan.

Thanks!

mrg


On Thu, Mar 11, 2010 at 3:21 AM, Juan E. Maya <ma...@gmail.com> wrote:
> Hi,
> Chenillekit has a Hidden component that renders the id.  I had the same
> problem just yesterday :)
>
> On Thu, Mar 11, 2010 at 2:03 AM, Josh Canfield <jo...@gmail.com>wrote:
>
>> > Should the Hidden component preserve the id?  In my TML I have:
>>
>> Probably, but it doesn't. You can look at the source for Hidden and
>> it's a very simple component. It doesn't output the id.
>>
>> You can try this:
>>
>> var form = $('contact');
>> var input = form['jumpToPage'];
>>
>> from http://www.prototypejs.org/api/form/element/getValue
>>
>> Josh
>>
>> On Wed, Mar 10, 2010 at 2:28 PM, Michael Gentry <mg...@masslight.net>
>> wrote:
>> > Hi everyone,
>> >
>> > Should the Hidden component preserve the id?  In my TML I have:
>> >
>> > <input id="jumpToPage" t:type="Hidden" t:id="jumpToPage"
>> t:value="jumpToPage"/>
>> >
>> > However, the generated HTML looks like:
>> >
>> > <input type="hidden" name="jumpToPage"/>
>> >
>> >
>> > Makes it hard to use $('jumpToPage') in my JavaScript to set the value.
>>  :-)
>> >
>> > If I switch to:
>> >
>> > <input style="display: none;" t:type="TextField" t:id="jumpToPage"
>> > t:value="jumpToPage"/>
>> >
>> > It works, but of course, that just feels wrong.  Thoughts?
>> >
>> > Thanks in advance,
>> >
>> > mrg
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>>
>> --
>> --
>> http://www.bodylabgym.com - a private, by appointment only, one-on-one
>> health and fitness facility.
>> --
>> http://www.ectransition.com - Quality Electronic Cigarettes at a
>> reasonable price!
>> --
>> TheDailyTube.com. Sign up and get the best new videos on the internet
>> delivered fresh to your inbox.
>>
>> ---------------------------------------------------------------------
>> 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: [T5.1] t:hidden + id

Posted by "Juan E. Maya" <ma...@gmail.com>.
Hi,
Chenillekit has a Hidden component that renders the id.  I had the same
problem just yesterday :)

On Thu, Mar 11, 2010 at 2:03 AM, Josh Canfield <jo...@gmail.com>wrote:

> > Should the Hidden component preserve the id?  In my TML I have:
>
> Probably, but it doesn't. You can look at the source for Hidden and
> it's a very simple component. It doesn't output the id.
>
> You can try this:
>
> var form = $('contact');
> var input = form['jumpToPage'];
>
> from http://www.prototypejs.org/api/form/element/getValue
>
> Josh
>
> On Wed, Mar 10, 2010 at 2:28 PM, Michael Gentry <mg...@masslight.net>
> wrote:
> > Hi everyone,
> >
> > Should the Hidden component preserve the id?  In my TML I have:
> >
> > <input id="jumpToPage" t:type="Hidden" t:id="jumpToPage"
> t:value="jumpToPage"/>
> >
> > However, the generated HTML looks like:
> >
> > <input type="hidden" name="jumpToPage"/>
> >
> >
> > Makes it hard to use $('jumpToPage') in my JavaScript to set the value.
>  :-)
> >
> > If I switch to:
> >
> > <input style="display: none;" t:type="TextField" t:id="jumpToPage"
> > t:value="jumpToPage"/>
> >
> > It works, but of course, that just feels wrong.  Thoughts?
> >
> > Thanks in advance,
> >
> > mrg
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
>
> --
> --
> http://www.bodylabgym.com - a private, by appointment only, one-on-one
> health and fitness facility.
> --
> http://www.ectransition.com - Quality Electronic Cigarettes at a
> reasonable price!
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T5.1] t:hidden + id

Posted by Josh Canfield <jo...@gmail.com>.
> Should the Hidden component preserve the id?  In my TML I have:

Probably, but it doesn't. You can look at the source for Hidden and
it's a very simple component. It doesn't output the id.

You can try this:

var form = $('contact');
var input = form['jumpToPage'];

from http://www.prototypejs.org/api/form/element/getValue

Josh

On Wed, Mar 10, 2010 at 2:28 PM, Michael Gentry <mg...@masslight.net> wrote:
> Hi everyone,
>
> Should the Hidden component preserve the id?  In my TML I have:
>
> <input id="jumpToPage" t:type="Hidden" t:id="jumpToPage" t:value="jumpToPage"/>
>
> However, the generated HTML looks like:
>
> <input type="hidden" name="jumpToPage"/>
>
>
> Makes it hard to use $('jumpToPage') in my JavaScript to set the value.  :-)
>
> If I switch to:
>
> <input style="display: none;" t:type="TextField" t:id="jumpToPage"
> t:value="jumpToPage"/>
>
> It works, but of course, that just feels wrong.  Thoughts?
>
> Thanks in advance,
>
> mrg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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