Results 1 to 2 of 2

Thread: Bottom slide tooltip

  1. #1
    Join Date
    Jul 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Bottom slide tooltip

    1) Script Title: Bottom slide tooltip

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...bottomtool.htm

    3) Describe problem: Not a functionality issue, but I wanted to know if there's a way to do this that doesn't put it in the HEAD section of the document, but rather in the body using variables pulled from a mysql database in PHP. IE, the image/text. I've noticed a few scripts with description[0], [1], etc, but that would be completely impractical with a database with 80,000+ records

  2. #2
    Join Date
    Jul 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I solved my own problem with the following. I run a basic query at the top to fetch all the possible tool tip items and then cycle them through the array.

    //SET TOOLTIP DESCRIPTIONS BELOW
    //Extend or contract array as needed
    var description=new Array()
    <?php while($tip = mysql_fetch_assoc($tipquery)) {
    $filename = 'images/players/'.$tip['playerID'].'.jpg';
    if (file_exists($filename))
    {
    $toolpic = $tip['playerID'];
    }
    else
    {
    $toolpic = "unknown";
    }
    ?>
    description['<?php echo $tip['playerID']; ?>']='<table border=0 cellpadding=0 cellspacing=0><tr><td width=95 height=135><img src="images/players/<?php echo $toolpic; ?>.jpg"></td><td width="100%" valign="middle"><font color="#FFFFFF"><strong><?php echo $tip['nameFirst']." ".$tip['nameLast'];?><br>Player Information</font></strong></td></tr></table>'
    <?php } ?>
    //Do not edit below here

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
  •