PDA

View Full Version : Smart Folding Menu Tree with checkboxes



vince144
04-21-2006, 03:49 AM
Is it possible to use the smart folding menu tree and as the but to use checkboxes at the leaves. I don't want all the leaves to be checkboxes but some of them

djr33
04-21-2006, 03:55 AM
Why? Instead of links?

I'm not looking at the script, but I can only assume that the <a href> tags for the links are something like <a href="jsfunction()"> or <a onclick="jsfunction()">

Once you know the right jsfunction,

Try <input type="checkbox" onSelect="jsfunction()">
I'm not sure if that's the right command. Try onSelect, onClick, onCheck, and maybe more. Sorry... just not sure what a checkbox uses.

jscheuer1
04-21-2006, 05:25 AM
Is it possible to use the smart folding menu tree and as the but to use checkboxes at the leaves. I don't want all the leaves to be checkboxes but some of them

Leaves? Do you mean you want to substitute checkboxes for the little folders or for the sub items that get revealed? What would you like checking/unchecking a checkbox to do?

djr33
04-21-2006, 06:16 AM
I think he meant checking a box instead of clicking a folder...

john, is my code right? onSelect? onClick? heh.

Actually... hmm... then again... you'd need to have it work for unchecking as well.

Perhaps onChange?

jscheuer1
04-21-2006, 07:53 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function doSomething(obj){
if (obj.checked)
alert('You just checked the checkbox')
else
alert('You just unchecked the checkbox')
}
</script>
</head>
<body>
<input type="checkbox" onclick="doSomething(this);" />

</body>
</html>

djr33
04-21-2006, 08:34 AM
just onclick... heh, ok. cool. there ya go then.

vince144
04-24-2006, 03:26 PM
I meant to replace both the folder and the items underneath e.g the folder would be a checkbox item and then subitem would be another folder but this one would not be a checkbox, then below that i would have checkbox items.



[x] Enable Settings
- Allowed
[x] OK
[x] Not Ok


Something like where [x] = checkboxes