Results 1 to 7 of 7

Thread: Smart Folding Menu Tree with checkboxes

  1. #1
    Join Date
    Apr 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Smart Folding Menu Tree with checkboxes

    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

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by vince144
    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?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <!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>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    just onclick... heh, ok. cool. there ya go then.

  7. #7
    Join Date
    Apr 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

    Code:
    [x] Enable Settings
      - Allowed
         [x] OK
         [x] Not Ok
    Something like where [x] = checkboxes

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •