Hi stephane!!
Boudiou ! Ma che face ?
What a lot of complications !
(css rules non understood, redondant divs, long js functions)
Yes it's a mess I need to take care of it. Please advice!!
it's an attribute I am adding to define some code action for
interaction
on each cell.
To avoid problems the simplest way is to give mouse events to the
element on forground level, preferably TD but last div runs too.
Thanks. I have seen I can:
1. Remove the outer div
2. Place the handlers in the second changing the coordinates top/left
3. Place the 3rd div within the second
This way it simplifies a lot and works fine.
\\
There is a remaining question. How do I get rid of that (damn) TABLE
structure
which I am using on to vertically center the text ??? Is there a
cleaner (css) way
to position vertically the text ?? I need to be able to do all:
TOP/MIDDLE/BOTTOM.
//
Here is the revised code:
------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<style type="text/css" media="screen">
..c1bg{position:absolute;background:#F0FFF0;border-width:1px;border-style
utset;}
..c1fg{position:absolute;border-width:0;color:#000000;background:transparent;text-align:left;font-family:Tahoma;font-size:11px;font-weight:bold;}
</style>
</head>
<body>
<script language="javascript" >
var previousStyle;
function mOver(MyDiv) {
mouseIsOnCellorMenu = true;
if (previousStyle == null) {
previousStyle = MyDiv.style.backgroundColor;
MyDiv.style.backgroundColor = "#ffff99";
}
}
function mOut(MyDiv) {
mouseIsOnCellorMenu = false;
if (previousStyle != null) {
MyDiv.style.backgroundColor = previousStyle;
previousStyle = null;
}
}
</script>
<div id ="RG1,89,1" enabledActions="7,0,5,2,6"
onclick="cellClick(event,this)" class=c1bg onmouseover = "mOver(this)"
onmouseout = "mOut(this)"
style="top:10px;left:112px;width:89px;height:20px;">
<div class=c1fg style="top:2px;left:2px;">
<table><tr><td width=83px height=14px
valign=middle>San Cristóbal</td>
</tr></table>
</div>
</div>
<div id ="RG1,89,2" enabledActions="7" onclick="cellClick(event,this)"
class=c1bg onmouseover = "mOver(this)" onmouseout = "mOut(this)"
style="top:10px;left:204px;width:270px;height:20px;">
<div class=c1fg style="top:2px;left:2px;">
<table><tr><td width=264px height=14px
valign=middle>Carrera 22 con Ave. Carlos Soublette #8-35</td>
</tr></table>
</div>
</div>
</body>
</html>