dreammaker888
Programmer
The following block of code is to show and hide tooltip when the curser mouseOver or mouseOut the title text. It works the way it is.
The code will open a table to display the tool Tip.
I am running into problem because my title text was already in a table already.
When I run the above script, the browser is confused with the table within table and throws the display in disarray.
How can I modify it so the Tool Tip will be ON TOP of the original table?
Thanks.
dmk
The code will open a table to display the tool Tip.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<!-- CUSTOM TOOLTIP -->
<script language="JavaScript" type="text/javascript">
<!-- Copyright 2004, Sandeep Gangadharan -->
<!-- For more free scripts go to [URL unfurl="true"]http://www.sivamdesign.com/scripts/[/URL] -->
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(add) {
if (dom) {document.getElementById('layer'+add).style.visibility='hidden';}
if (document.layers) {document.layers["layer"+add].visibility='hide';}
}
function showIt(add) {
if (dom) {
if (document.getElementById('layer'+add).style.visibility=='visible') { hideIt(add); }
else {document.getElementById('layer'+add).style.visibility='visible'} }
if (document.layers) {
if (document.layers["layer"+add].visibility=='show') { hideIt(add); }
else {document.layers["layer"+add].visibility='show'} }
}
// -->
</script>
</head>
<body>
<?php
$layctr=1;
$adDesc = "This is first line of text";
$adDesc = $adDesc . "</br>This is another line of text";
$adDesc = $adDesc . "</br>This is another line of text";
$adDesc = $adDesc . "</br>This is another line of text";
Echo '<div id="layer' . $layctr . '" style="position:absolute; top:20px; left:80px; width:480px; visibility:hidden; background-color: #FFFF99; border: 1pt single">';
echo '<table border="0" bgcolor="#FFFF99" cellpadding="2" cellspacing="0">';
echo ' <tr><td align="left"><font face="verdana, arial, helvetica, sans-serif" size="1">';
echo $adDesc;
echo ' </font></td></tr>';
echo '</table>';
echo '</div>';
echo '<font size="2"><a href="[URL unfurl="true"]http://yahoo.com"[/URL] "#" onMouseOver="showIt(' . $layctr . ')" onMouseOut="hideIt(' . $layctr . ')"><b>Links 1</b></a></font><br /><br /> ';
?>
</body>
</html>
I am running into problem because my title text was already in a table already.
When I run the above script, the browser is confused with the table within table and throws the display in disarray.
How can I modify it so the Tool Tip will be ON TOP of the original table?
Thanks.
dmk