Board Logo

Checkbox in a tree node
sagivc - 8/18/2004 at 10:28 AM

Do you support in checkbox for a tree node (in the Tree Menu Pro)?


tigra - 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 - 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 - 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
}

}


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/