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");
}