Dan G. Switzer, II wrote:
David,

  I have a question about selectors. First of all, I have the
following html:

                        <div id="content">
                                        <a href="#"> <input type="checkbox"
name="option1"
value="Novedad1"> Novedad 1: HOla holaaa </a>

                        </div>


  As you can see, I have a div an inside it a link which has a
checkbox an text.


 Well, what I would like to do is to associate a click event when the
user clicks on the link, but with an exception: This event should
raise when the user clicks anywhere on the link excepts on the
checkbox that it is inside the link.

What's are you trying to do with the UI?

It looks like you might be trying to emulate the functionality already
built-in to the <label /> tag.

The <label /> associates it's children items to a specific field. This makes
it so clicking on the contents of the <label /> tag to act as if the field
it's had been clicked.

For example:

<label for="idOption1">
<input type="checkbox" name="option1" id="idOption1" value="Novedad1" /> Novedad 1: HOla holaaa
</label>

If you click on the text "Novedad 1: HOla holaaa" the browser will behave as
if you clicked on the checkbox itself.

-Dan



just as a side-note, this does not work in ie6..

dennis.

Reply via email to