View Full Version : Bottom slide tooltip

07-30-2006, 02:39 PM
1) Script Title: Bottom slide tooltip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/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 :)

07-30-2006, 04:46 PM
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.

//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'];
$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