Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Floating TOC javascript

    Hi.

    I have a script that produces a floating box on the right-hand-side of a page. It works fine in IE6, IE7 and Firefox (and for this project, those are the only browsers that really matter at the moment!).
    I also have another script that generates a table of contents from the headlings in a page on the fly.
    My aim is to combine the two, so that the table of contents appears in the floating box.

    The web page in question ishttp://www.healthcareworkforce.nhs.u...pages/help.php. If you view it in Firefox, you'll see that it works perfectly. In IE6, though, the list formatting of the TOC completely disappears and it looks a mess - but it does float. In IE7, the TOC looks as it should but the box no longer floats.

    I'm going to work on an alternative way (making the TOC server-side) but meanwhile if anyone can spot an obvious solution I'd be grateful.

    Cheers,
    Waggers
    If at first you do succeed, you've probably missed something.

  2. #2
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Floating TOC javascript

    OK, I've now ditched the TOC-maker script and the table of contents is made server-side. It now works perfectly in IE6 as well as Firefox but still doesn't float in IE7. Rather strangely, I use exactly the same script in a different page (I'd post a link but I'm afraid it requires a login for you to view it) in the same site and it works perfectly in all 3 browsers. Any ideas what's wrong with the page in IE7? No javascript errors appear, it just doesn't work!
    Waggers
    If at first you do succeed, you've probably missed something.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Floating TOC javascript

    So many images... loading takes forever... <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Do you know whether the script runs at all? Maybe with a few alerts you can figure out where the problem lies. In particular, I'd check the various values being used to recalculate the position of the floatLayer.

    (I don't have IE7, so can't see for myself.)

  4. #4
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Floating TOC javascript

    Yep, I'll have to do something about those images.

    My customer wants to go live fairly soon so I've gone for a more robust/traditional approach with the TOC at the top of the page and sporadic links to it sprinkled throughout (no javascript involved) for the time being. I'll keep working on this on my development server (like I had one of those! I mean my laptop) though and will get back if/when I find a solution.

    <insert usual grumbles about IE here>
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

Posting Permissions

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