holli
02-04-2007, 01:56 PM
1) Script Title:
image thumbnail viewer
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
3) Describe problem:
if have the website layout done with DIV's and TABLES (800x600) and i generate a table with PHP from a mysql DB - col1 is the image col2 description col3,...
since i have the js activated the complete layout of the site is not correct anymore all tables are moved to the right and the site is blank - so i need to scroll to the right to get to the table the link works and the lager image shows in the middle thats OK - but not that the tables are moved to the right.
here is an extract of the layout:
<div id="ganzeseitediv">
<TABLE id="ganzeseitetable">
<TR>
<TD>
<TABLE width="800" height="75" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD width="800" bgcolor="red" height="25"></TD>
<TD rowspan="3" align="center" width="230"><IMG name="logofade" width="230" height="75" align="center" alt="www.holli.at" src="./bilder/logo1.gif" border="0"></TD>
</TR>
<TR>
<TD bgcolor="white" align="center" height="25"><FONT size="4" color="red" id="welcome">www.HOLLI.at</FONT></TD>
</TR>
<TR>
<TD bgcolor="red" height="24">*</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD>
<div style="width:816px; height:500px; overflow:auto; scrollbar-base-color:red; scrollbar-arrow-color:red;
scrollbar-face-color:white; scrollbar-track-color=#F7FFC1; scrollbar-shadow-color:red; scrollbar-highlight-color:red;
scrollbar-darkshadow-color:red; scrollbar-3dlight-color:red;">
<TABLE width="800" height="500" border="1" cellspacing="0" cellpadding="0">
<?php
/* tabelle baby1 hat die spalten: id, datum, bildkl, bildgr, text, fungif */
echo "<TR>\n";
/* echo " <div style='width:600px; height:400px;'></div>\n";
echo " <script language='JavaScript' src='./js/thumbnailviewer.js'></script>\n"; */
echo " <TD width='100'></TD>\n";
echo " <TD width='25'>*</TD>\n";
echo " <TD width='100' align='center' valign='center'>\n";
echo " <TD valign='top' width='400' align='center'><h2>Unser 1. Baby</h2>\n";
echo " <TD align='center' valign='center'>*\n";
echo " <TD width='25'>*</TD>\n";
$link = mysql_connect("localhost", "d0032b12", "counterkale") or die("Keine Verbindung moeglich: " . mysql_error());
mysql_select_db("d0032b12") or die("Auswahl der Datenbank fehlgeschlagen");
$query = "SELECT bildkl, bildgr, datum, text, fungif FROM baby1 order by datum desc";
$result = mysql_query($query) or die("Anfrage fehlgeschlagen: " . mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_NUM)) {
echo "<TR>\n";
echo " <TD width='100'></TD>\n";
echo " <TD width='25'>*</TD>\n";
echo " <TD width='100' align='center' valign='top'>
<p><a href='./bilder/baby1/$line[1]' rel='thumbnail' title='xyz'>
<img src='./bilder/baby1/$line[0]' width='100' height='75' alt='1. Baby Foto'>
</a></p></TD>\n";
echo " <TD valign='center' width='400' align='justify'>$line[2] $line[3]\n";
echo " <TD align='center' valign='center'><img src='./bilder/baby1/$line[4]' width='149' height='124'></TD>\n";
echo " <TD width='25'>*</TD>\n";
echo "</TR>\n";
}
mysql_free_result($result);
mysql_close($link);
echo "</TR>\n";
?>
</div>
</TD>
</TR>
</TD>
</TR>
</TABLE>
<script language="JavaScript">
new menu (MENU_ITEMS, MENU_TPL);
</script>
</div>
</BODY>
</HTML>
CSS:
#ganzeseitediv {
position:absolute;
background-color:#F7FFC1;
width:800;
height:600;
left:25;
top:25;
}
any help would be great
thanks
holli
image thumbnail viewer
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
3) Describe problem:
if have the website layout done with DIV's and TABLES (800x600) and i generate a table with PHP from a mysql DB - col1 is the image col2 description col3,...
since i have the js activated the complete layout of the site is not correct anymore all tables are moved to the right and the site is blank - so i need to scroll to the right to get to the table the link works and the lager image shows in the middle thats OK - but not that the tables are moved to the right.
here is an extract of the layout:
<div id="ganzeseitediv">
<TABLE id="ganzeseitetable">
<TR>
<TD>
<TABLE width="800" height="75" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD width="800" bgcolor="red" height="25"></TD>
<TD rowspan="3" align="center" width="230"><IMG name="logofade" width="230" height="75" align="center" alt="www.holli.at" src="./bilder/logo1.gif" border="0"></TD>
</TR>
<TR>
<TD bgcolor="white" align="center" height="25"><FONT size="4" color="red" id="welcome">www.HOLLI.at</FONT></TD>
</TR>
<TR>
<TD bgcolor="red" height="24">*</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD>
<div style="width:816px; height:500px; overflow:auto; scrollbar-base-color:red; scrollbar-arrow-color:red;
scrollbar-face-color:white; scrollbar-track-color=#F7FFC1; scrollbar-shadow-color:red; scrollbar-highlight-color:red;
scrollbar-darkshadow-color:red; scrollbar-3dlight-color:red;">
<TABLE width="800" height="500" border="1" cellspacing="0" cellpadding="0">
<?php
/* tabelle baby1 hat die spalten: id, datum, bildkl, bildgr, text, fungif */
echo "<TR>\n";
/* echo " <div style='width:600px; height:400px;'></div>\n";
echo " <script language='JavaScript' src='./js/thumbnailviewer.js'></script>\n"; */
echo " <TD width='100'></TD>\n";
echo " <TD width='25'>*</TD>\n";
echo " <TD width='100' align='center' valign='center'>\n";
echo " <TD valign='top' width='400' align='center'><h2>Unser 1. Baby</h2>\n";
echo " <TD align='center' valign='center'>*\n";
echo " <TD width='25'>*</TD>\n";
$link = mysql_connect("localhost", "d0032b12", "counterkale") or die("Keine Verbindung moeglich: " . mysql_error());
mysql_select_db("d0032b12") or die("Auswahl der Datenbank fehlgeschlagen");
$query = "SELECT bildkl, bildgr, datum, text, fungif FROM baby1 order by datum desc";
$result = mysql_query($query) or die("Anfrage fehlgeschlagen: " . mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_NUM)) {
echo "<TR>\n";
echo " <TD width='100'></TD>\n";
echo " <TD width='25'>*</TD>\n";
echo " <TD width='100' align='center' valign='top'>
<p><a href='./bilder/baby1/$line[1]' rel='thumbnail' title='xyz'>
<img src='./bilder/baby1/$line[0]' width='100' height='75' alt='1. Baby Foto'>
</a></p></TD>\n";
echo " <TD valign='center' width='400' align='justify'>$line[2] $line[3]\n";
echo " <TD align='center' valign='center'><img src='./bilder/baby1/$line[4]' width='149' height='124'></TD>\n";
echo " <TD width='25'>*</TD>\n";
echo "</TR>\n";
}
mysql_free_result($result);
mysql_close($link);
echo "</TR>\n";
?>
</div>
</TD>
</TR>
</TD>
</TR>
</TABLE>
<script language="JavaScript">
new menu (MENU_ITEMS, MENU_TPL);
</script>
</div>
</BODY>
</HTML>
CSS:
#ganzeseitediv {
position:absolute;
background-color:#F7FFC1;
width:800;
height:600;
left:25;
top:25;
}
any help would be great
thanks
holli