sagivc
Newbie
Posts: 1
Registered: 8/18/2004
Member Is Offline
|
| posted on 8/18/2004 at 10:28 AM |
|
|
Checkbox in a tree node
Do you support in checkbox for a tree node (in the Tree Menu Pro)?
|
|
|
tigra
Administrator
Posts: 1982
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/18/2004 at 02:53 PM |
|
|
There is no support specifically for checkboxes, but as long as you can use any HTML code within item's text you can also put checkboxes there.
Contact us for free quote in case you need cascading select and other additional functionality related to selectboxes.
|
|
|
kcbaltz
Junior Member
Posts: 3
Registered: 11/12/2004
Member Is Offline
|
| posted on 11/12/2004 at 11:05 PM |
|
|
I tried adding a checkbox to the name of the node, and that cause it to appear correctly, but I was unable to click on it without triggering the
onclick handler for the whole node. Is there a way to locally disable that handler?
|
|
|
kcbaltz
Junior Member
Posts: 3
Registered: 11/12/2004
Member Is Offline
|
| posted on 11/13/2004 at 12:11 AM |
|
|
Nevermind, I figured it out. I added the following to the checkbox <input> tag:
onclick='cancelEventPropagation()'
The javascript for that method looks like:
function cancelEventPropagation()
{
var e = window.event;
// alert('click: ' + obj.name);
if (! e) {
alert ('no event received');
}
else if (e.stopPropagation) {
e.stopPropagation(); // use w3c standard
// if (e.cancelable) e.preventDefault(); // this would stop this event from affecting the src object
}
else {
e.cancelBubble = true; // use IEs special methods
e.returnValue = true; // let this event actually fire
}
}
|
|
|