You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Max Grigoriev <da...@mail.ru> on 2003/10/06 10:48:06 UTC

Re[2]: Tapestry and ID question

Hello Mind,

I want to set lable for chechbox. If i use such construction:

<input type="checkbox"/> My title

Then i must click directly on checkbox to select it.
But if i use :

<input type="checkbox" id="myId"/><label for="myId">My Title</lable>

Then i can click on checkbox and on text. It's much useful then simple
checkbox.

And common question, what is technique one object to use id of another
object.

Monday, October 6, 2003, 12:30:24 PM, you wrote:

MB> Sorry, what exactly do you want to achieve?

MB> -----Original Message-----
MB> From: Max Grigoriev [mailto:darkit@mail.ru]
MB> Sent: Monday, October 06, 2003 11:12 AM
MB> To: tapestry-user@jakarta.apache.org
MB> Subject: Tapestry and ID question


MB> Hello tapestry-user,

MB>   Is it possible to make such thing using Tapestry?

MB>   <input type="checkbox" id="myId"/><label for="myId">My Title</lable>

MB> Thank's




-- 
Best regards,
 Max                            mailto:darkit@mail.ru


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


RE: Re[2]: Tapestry and ID question

Posted by Mind Bridge <mi...@yahoo.com>.
Ok, now it is more clear.

You can easily implement that using the following HTML:

<input type="checkbox" id="myId"/>
<span onclick="myId.checked=!myId.checked">A Label</span>

So you do not need Tapestry support for that.

Of course, it would be ideal to make a component that wraps Checkbox and
adds support for the code above. To make it more generic, the java script
should use the name of the checkbox defined by Tapestry rather than a
predefined id. This would allow to have multiple such components on the same
page without worry what IDs to give them.

It will be even more ideal if you submit that component to Tacos :)

Best regards,
-mb

-----Original Message-----
From: Max Grigoriev [mailto:darkit@mail.ru]
Sent: Monday, October 06, 2003 11:48 AM
To: Tapestry users; Mind Bridge
Subject: Re[2]: Tapestry and ID question


Hello Mind,

I want to set lable for chechbox. If i use such construction:

<input type="checkbox"/> My title

Then i must click directly on checkbox to select it.
But if i use :

<input type="checkbox" id="myId"/><label for="myId">My Title</lable>

Then i can click on checkbox and on text. It's much useful then simple
checkbox.

And common question, what is technique one object to use id of another
object.

Monday, October 6, 2003, 12:30:24 PM, you wrote:

MB> Sorry, what exactly do you want to achieve?

MB> -----Original Message-----
MB> From: Max Grigoriev [mailto:darkit@mail.ru]
MB> Sent: Monday, October 06, 2003 11:12 AM
MB> To: tapestry-user@jakarta.apache.org
MB> Subject: Tapestry and ID question


MB> Hello tapestry-user,

MB>   Is it possible to make such thing using Tapestry?

MB>   <input type="checkbox" id="myId"/><label for="myId">My Title</lable>

MB> Thank's




--
Best regards,
 Max                            mailto:darkit@mail.ru


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


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