bohnejo
01.07.2006, 00:45:53
hallo,
ich hab nen kleines problem:
eine php-funktion generiert eine tabelle und packt diese in einen string.
bsp:
$TABELLE="<table> ... </table>";
soweit funktioniert alles, nur:
geb ich $TABELLE mit
<?php echo $TABELLE ?>
ist die formatierung der spalten richtig.
lass ich die tabelle über einen java-script tooltip ausgeben, funktioniert die spaltenausrichtung nicht mehr...
ein beispiel gibt's hier: http://www.tippmaschine.de/test.php
das problem beim tooltip ist, daß die letzten beiden spalten extrem zusammengestaucht werden, wobei bspw. in der datumsspalte genug platz ist.
bzw. werden die text-ausrichtungen nicht korrekt dargestellt.
javascript-toolstipps:
wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY;
if (wmtt != null) {
wmtt.style.left = (x - 10) + "px";
wmtt.style.top = (y + 20) + "px";
}
}
function showWMTT(id) {
wmtt = document.getElementById(id);
wmtt.style.display = "block"
}
function hideWMTT() {
wmtt.style.display = "none";
}
..und der tooltip-inhalt:
function TT_INHA($CONT_ID,$UEB,$CONTENT,$WIDTH)
{
#$UEB -> Überschrift
#$CONTENT -> Inhalt ($TABELLE)
#$WIDTH -> tooltipbreite
if ($WIDTH =="") $WIDTH="150px";
else $WIDTH.="px";
$RETURN="<div class=\"tooltip2\" id=\"$CONT_ID\" style=\"width: $WIDTH;\" >";
$RETURN.="<div class=\"head\">$UEB</div>";
$RETURN.="<div class=\"content\">$CONTENT</div></div> \n";
return $RETURN;
}
bin für jede hilfe dankbar,
mfg bohnejo.
ich hab nen kleines problem:
eine php-funktion generiert eine tabelle und packt diese in einen string.
bsp:
$TABELLE="<table> ... </table>";
soweit funktioniert alles, nur:
geb ich $TABELLE mit
<?php echo $TABELLE ?>
ist die formatierung der spalten richtig.
lass ich die tabelle über einen java-script tooltip ausgeben, funktioniert die spaltenausrichtung nicht mehr...
ein beispiel gibt's hier: http://www.tippmaschine.de/test.php
das problem beim tooltip ist, daß die letzten beiden spalten extrem zusammengestaucht werden, wobei bspw. in der datumsspalte genug platz ist.
bzw. werden die text-ausrichtungen nicht korrekt dargestellt.
javascript-toolstipps:
wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY;
if (wmtt != null) {
wmtt.style.left = (x - 10) + "px";
wmtt.style.top = (y + 20) + "px";
}
}
function showWMTT(id) {
wmtt = document.getElementById(id);
wmtt.style.display = "block"
}
function hideWMTT() {
wmtt.style.display = "none";
}
..und der tooltip-inhalt:
function TT_INHA($CONT_ID,$UEB,$CONTENT,$WIDTH)
{
#$UEB -> Überschrift
#$CONTENT -> Inhalt ($TABELLE)
#$WIDTH -> tooltipbreite
if ($WIDTH =="") $WIDTH="150px";
else $WIDTH.="px";
$RETURN="<div class=\"tooltip2\" id=\"$CONT_ID\" style=\"width: $WIDTH;\" >";
$RETURN.="<div class=\"head\">$UEB</div>";
$RETURN.="<div class=\"content\">$CONTENT</div></div> \n";
return $RETURN;
}
bin für jede hilfe dankbar,
mfg bohnejo.