Results 1 to 3 of 3

Thread: Folding Tree Help with Indent

  1. #1
    Join Date
    Aug 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Folding Tree Help with Indent

    Original script: http://www.dynamicdrive.com/dynamicindex1/navigate1.htm

    See example at http://www.yardview.com/nested.htm

    I want to reduce the amount of indentation. I read the posts but could not see where I would place the code. Any help would be appreciated. Thank you.

    var head="display:''"
    img1=new Image()
    img1.src="..\CSS\ReportImages\fold2.gif"
    img2=new Image()
    img2.src="..\CSS\ReportImages\open2.gif"

    var ns6=document.getElementById&&!document.all
    var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

    function checkcontained(e){
    var iscontained=0
    cur=ns6? e.target : event.srcElement
    i=0
    if (cur.id=="foldheader")
    iscontained=1
    else
    while (ns6&&cur.parentNode||(ie4&&cur.parentElement)){
    if (cur.id=="foldheader"||cur.id=="foldinglist"){
    iscontained=(cur.id=="foldheader")? 1 : 0
    break
    }
    cur=ns6? cur.parentNode : cur.parentElement
    }

    if (iscontained){
    var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
    if (foldercontent.style.display=="none"){
    foldercontent.style.display=""
    cur.style.listStyleImage="url(..\\CSS\\ReportImages\\open.gif)"
    }
    else{
    foldercontent.style.display="none"
    cur.style.listStyleImage="url(..\\CSS\\ReportImages\\fold.gif)"
    }
    }
    }

    if (ie4||ns6)
    document.onclick=checkcontained
    Last edited by ddadmin; 08-25-2005 at 07:14 PM.

  2. #2
    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

    I would need to see a working (or not working) example:

    PLEASE: Include the URL to your problematic webpage that you want help with.
    - John
    ________________________

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

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    img1.src="..\CSS\ReportImages\fold2.gif"
    Never put backslashes in URIs. IE compensates, because MS would like every webserver to be more like their operating system. Everything else doesn't.
    Try setting the margin-left:.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •