SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE being a problematic piece of crap?

    OK, i got my site up and running nicely in firebird (a standards-compliant browser) thinking this means it would work in all, did it? nooooo, microsoft, in all their wisdom, have evidently decided to make us work twice as hard for no reason - brilliant! My problem is in making an expanding/collapsing menu, can anybody see anything wrong with it? there is mixed PHP and JavaScript, but Im pretty sure its the JavaScript causing the problem, the page can be found here - http://infinite-fire.net/if/index.php if you want to see the problem, basically firebird displays all the links as it should, IE shows only the first 2. Here is the code...

    PHP Code:
    <?
    include("settings.php");

    $linkset '<table width="210" border="0" cellpadding="5" cellspacing="0" class="conetentarea"><tr>
    <td align="center"><img src="images/heading_nav.gif" width="69" height="21"></td><tr><td class="nav_padding">'
    ;
    mysql_connect('localhost''huscy_86''drawing') or die(mysql_error());
    mysql_select_db($db) or die(mysql_error());
    $levelone_sql mysql_query('select linkname, linkto, alt_text, parent from '.$n_table.' where level = "1"') or die(mysql_error());
    while(
    $levelone mysql_fetch_array($levelone_sql))
    {
        if(isset(
    $_SESSION['style']))
        {
        
    $levelone['linkto'] .= '&&style='.$_SESSION['style'];
        }
        
        
    $leveltwocheck mysql_query('select linkname, linkto, alt_text, parent from '.$n_table.' where level="2" and parent = "'.$levelone['linkname'].'"') or die(mysql_error());
        if(
    mysql_num_rows($leveltwocheck) == 0)
        {
            
    $linkset .= '<a href="'.$levelone['linkto'].'" onMouseover="window.status=\''.$levelone['alt_text'].'\';\'\';return true" onMouseout="window.status=\'\';return true">'.$levelone['linkname'].'</a><br>';
        }
        else
        {
            
    $linkset .= '<a href="'.$levelone['linkto'].'" onClick="return showmenu(\''.$levelone['linkname'].'\')" onMouseover="window.status=\''.$levelone['alt_text'].'\';\'\';return true" onMouseout="window.status=\'\';return true">+ '.$levelone['linkname'].'</a><br>';
        }
        
    $linkset .= '<span class="menu" id="'.$levelone['linkname'].'">';    
        
    // LEVEL TWO
        
    $leveltwo_sql mysql_query('select linkname, linkto, alt_text, parent from '.$n_table.' where level = "2" and parent = "'.$levelone['linkname'].'"') or die(mysql_error());
        while(
    $leveltwo mysql_fetch_array($leveltwo_sql))
        {
        if(isset(
    $_SESSION['style']))
        {
        
    $leveltwo['linkto'] .= '&&style='.$_SESSION['style'];
        }
            
    $levelthreecheck mysql_query('select linkname, linkto, alt_text, parent from '.$n_table.' where level="3" and parent = "'.$leveltwo['linkname'].'"') or die(mysql_error());
            if(
    mysql_num_rows($levelthreecheck) == 0)
            {
                
    $linkset .= '<a href="'.$leveltwo['linkto'].'" onMouseover="window.status=\''.$leveltwo['alt_text'].'\';\'\';return true">- '.$leveltwo['linkname'].'</a><br>';
            }
            else
            {
                
    $linkset .= '<a href="'.$leveltwo['linkto'].'" onClick="return showmenu(\''.$leveltwo['linkname'].'\')" onMouseover="window.status=\''.$leveltwo['alt_text'].'\';\'\';return true" onMouseout="window.status=\'\';return true">+ '.$leveltwo['linkname'].'</a><br>';
            }
            
    $linkset .= '<span class="menu" id="'.$leveltwo['linkname'].'">';
            
            
    // LEVEL THREE
            
    $levelthree_sql mysql_query('select linkname, linkto, alt_text, parent from '.$n_table.' where level = "3" and parent = "'.$leveltwo['linkname'].'"') or die(mysql_error());
            while(
    $levelthree mysql_fetch_array($levelthree_sql))
            {
                if(isset(
    $_SESSION['style']))
                {
                
    $levelthree['linkto'] .= '&&style='.$_SESSION['style'];
                }
            
    $linkset .= '<a href="'.$levelthree['linkto'].'" onMouseover="window.status=\''.$levelthree['alt_text'].'\';\'\';return true" onMouseout="window.status=\'\';return true">- '.$levelthree['linkname'].'</a><br>';        
            }
            
            
    $linkset .= '</span';
        }
        
    $linkset .= '</span>';
    }
    $linkset .= '</td></tr></table>';
    echo(
    $linkset);

    ?>

  2. #2
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This doesn't really help you, but it breaks the same way in Opera too.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  3. #3
    Non-Member mmi's Avatar
    Join Date
    Jun 2001
    Location
    Rhode Island
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Huscy

    Is it unhappy about unclosed SPAN tags?

  4. #4
    Non-Member mmi's Avatar
    Join Date
    Jun 2001
    Location
    Rhode Island
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When they're closed right away, the menu stays open in Mozilla. I was hoping it would start working in IE, but ...

    http://ememi.com/tmp/huscy/Huscy.html

  5. #5
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    :'(

  6. #6
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its working for me when i close the span in ie, not for you?

  7. #7
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://infinite-fire.net/if/index.php there you go, it WAS the unclosed span - thanks


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
  •