-
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?
-
-
-
-
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.
-
-
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.
-
-
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.
-
-
doh! ok. Now to go figure out how to do that. I'm still learning this stuff
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks