If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
squished18
Posts: 289
Registered: ‎10-17-2008
My Device: Torch 9800
My Carrier: Rogers

checkbox label behaviour

Hello,

 

I have a checkbox with a label that follows after. I have bound a click event to the label but not to the checkbox. In the simulator, when I click the checkbox it is firing the label event and it doesn't toggle the checkbox.

 

I also run the code in Chrome and I don't get this behaviour. In Chrome, when I click the checkbox, it toggles as expected.

 

Any ideas on what might be the problem here?

 

Here is the code for the checkbox and label:

            treefieldChecklistHTML += "<input id=\'checkbox" + i + "\' type='checkbox'>" +
                                      "<label id=\'labelTask" + i + "\'>" + checklistToEdit.arrTasks[i].sDescription + "</label>" +
                                      "<br>";

 Here is how I bind the label event:

        $('label:not(#labelDescription)').click(function (evt)
            {
                clickEventTask(evt);
            }); // end .click bind

 Thanks,

 

feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Please use plain text.