Results 1 to 2 of 2

Thread: switch content script problems!!!

  1. #1
    Join Date
    Nov 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default switch content script problems!!!

    Here is the link where I am using this script:
    http://www.extremebattles.com/modules.php?name=ladders

    Go to that link and it's supposed to work like this:
    You click on the game on the left and the ladders come up underneath it.

    Here is the php code where the problem is happening:
    PHP Code:
    echo "<div id=\"sc1\" class=\"switchcontent\">";
    while (
    $count != $laddercount) {
    echo 
    "<tr><td>$ladder[$count]</td></tr>";
    $count++;
    }

    echo 
    "</div></table></td>"
    I think it has something to do with the <tr><td>'s it echo's out inside the <div>....
    Is this the problem, if so how can i fix this?
    If not what else could be wrong?
    Thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmmm it's hard to read your page's source due to how long it is, so I'll have to look at what you posted above for clues. It's very possible the <tr> and <td>s that are within each DIV is the culprit, since ideally you'll want to keep the HTML valid and straightforward within each DIV.

    I'm not sure there is an easy fix for this, unfortunately. If you know enough about CSS, you can simulate table rows/columns using regular DIV tags, which should work within each master DIV.

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
  •