auto scrolling at certain point?
Posted: Sat Apr 14, 2007 2:50 am
Hi there, i have a table and in that table one cell of it has this div
in that div i add smaller tables, creating kind of a list with info
All those info table are listed in another way on another cell of the table...What i want to do is to highlight the litle table in that div whenever i hover the mouse over the elements on the other listing.
So far i managed to add a border, didnt manage to change the color of it.
Moreover (and mainly) though i would like the div to automatically scroll so the highlighted table shows in the scrollable cell
my code conserning that is
thanks
Code: Select all
<div id = "listdiv" style="width:600px;height:400px;overflow:auto;" onmouseover="mouseover_list();" onmouseout="mouseout_list();">Code: Select all
mylist = document.getElementById("listdiv");
var small_info = document.createElement("table");
small_info.innerHTML = htmlstring;So far i managed to add a border, didnt manage to change the color of it.
Moreover (and mainly) though i would like the div to automatically scroll so the highlighted table shows in the scrollable cell
my code conserning that is
Code: Select all
function highlight_on_list(id){
small_info = document.getElementById(id);
small_info.setAttribute("border" ,"1");
small_info.setAttribute("bordercolor","#003366");
}
function highlight_out_list(id){
small_info = document.getElementById(id);
small_info.setAttribute("border" ,"0");
}