Results 1 to 6 of 6

Thread: Content Switcher II on dynamic tables

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

    Default Content Switcher II on dynamic tables

    I have a bit of PHP that creates tables on the fly that I am trying to incorporate Content Switcher II into. I get it to work mostly, but I am getting hung up on the static ID. I have only one table and several other are generated from the one template.

    When I use Content switcher, I get the first table to expand/contract and I can use the global expand contract, but if I click on any other table, it only expands and contracts the frist table. So if I have 4 tables, and I click on the 4th one, the first one will expand/contract and the fourth will remain unchanged.

    Is there any possibility of being able to use Content Switcher for this of scenario?

  2. #2
    Join Date
    Oct 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Any ideas on this?

  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

    What exactly do you mean by static ID? If all of your expandable content sections have the same ID, this type of behavior is what I would expect. If I recall correctly, in the original script, each section has a unique ID, incremented by one. Like sc1, sc2, sc3, etc. Does your PHP code generate id's like that or not?

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format for asking a question.
    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

  4. #4
    Join Date
    Oct 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no it doesn't. There is a php file that takes the table in the template file and creates however many it thinks it needs from that template file. The template only has one table in it. Here is the link to page

    http://www.rpghq.org/phpbbext/

    The page is sort of a mess and has other errors on it, but I figure I can work those out after i get this thing to work

    Original script - http://www.dynamicdrive.com/dynamici...chcontent2.htm
    Last edited by dioncecht; 10-24-2005 at 02:30 PM.

  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

    That would be the trouble or at least one problem. The generated code on the 'power metal' style has all the same ids. Your PHP code that generates the tables needs to assign unique ids in the form expected by the script. Instead of:

    ID="sc1(0)"

    for each one, get it to write out:

    id="sc1"

    id="sc2"

    and so on.
    - John
    ________________________

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

  6. #6
    Join Date
    Oct 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    doh! ok. Now to go figure out how to do that. I'm still learning this stuff

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
  •