Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 32
  1. #1
    Junior Member
    Join Date
    Jun 2003
    Posts
    7
    Member #
    1764
    I found a great expand/collapse script, but I need to tweak it some. I've attached all of the code, but I need to know how to make the tree automatically expanded rather than collapsed to begin with. I tried removing "style="display: none"" within the TR tags, but then I get two problems:

    -It must be double clicked to work the first time (IE)
    -It shows "Error on Page" on the bottom explorer tool bar after clicking the expand link.

    Assistance would be appreciated.

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    where is the code?
    JR

  4. #3
    Junior Member
    Join Date
    Jun 2003
    Posts
    7
    Member #
    1764
    Ack! Sorry about that. That's what happens when I have more than 10 windows open.

  5. #4
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    You need to change a couple of things for this to work.
    Each one of these:
    [minicode]style="display: none"[/minicode]
    needs to be changed to
    [minicode]style="display: inline"[/minicode]
    and
    Code:
      if (tableToggle) {
      tableToggle = false;
       ...
      } else {
      tableToggle = true;
       ...
    needs to be changed to
    Code:
      if (!tableToggle) {
      tableToggle = true;
       ...
      } else {
      tableToggle = false;
       ...
    That should do the trick!
    - Brian

  6. #5
    Junior Member
    Join Date
    Jun 2003
    Posts
    7
    Member #
    1764
    Awesome. Glad that this site lives up to it's rep. Thanks a lot.

  7. #6
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    No problem, glad to help!
    - Brian

  8. #7
    Senior Member
    Join Date
    Aug 2003
    Location
    Melbourne, Australia
    Posts
    162
    Member #
    2563
    I am after something similar for a news section on my site. I want to set my news up so that you click on the news headings and then the article expands. Any suggestions on how I can alter this code to suit?

    The URL where I want to implement it is (old url)

  9. #8
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    You can do that pretty easily. Just put text in the cell where the links are.

  10. #9
    Senior Member
    Join Date
    Aug 2003
    Location
    Melbourne, Australia
    Posts
    162
    Member #
    2563
    well...i got lost and I am sure someone will put me back on track pretty quickly with this one...

    I altered the code so that it would display the news headings and then expand to show the article when you click on the heading. The problem is that when you click on one item to expand all items expand. I would prefer it that only the item that is clicked on expands.

    Have a look at the quick mock up I did that demonstrates what my problem is.

  11. #10
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Try this...
    JR


Page 1 of 4 1 2 3 ... LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:29 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com