Click to See Complete Forum and Search --> : ajust collum width's


me2
12-10-2005, 09:14 PM
hi all

im haveing some problem with ..ajusting collum width's

hope someone can help...this is what i got so far

thanks

<script type="text/javascript">
function Pmenuajust()
{
var rows = document.getElementById('menukort').rows;
for(var i = 0; i < rows.length; i++)
{
document.getElementById('menukort').rows[i].cells[0].Width=0;
document.getElementById('menukort').rows[i].cells[1].Width=0;
document.getElementById('menukort').rows[i].cells[2].Width=200;
document.getElementById('menukort').rows[i].cells[3].Width=30;
document.getElementById('menukort').rows[i].cells[4].Width=30;
document.getElementById('menukort').rows[i].cells[5].Width=40;
document.getElementById('menukort').rows[i].cells[6].Width=60;

}
}
</script>

<input id="Button1" onclick="Pmenuajust()" type="button" value="button" />

Kravvitz
12-10-2005, 10:10 PM
JavaScript is case-sensitive.

Try cells[0].width and cells[0].style.width

me2
12-11-2005, 03:59 AM
thanks for reply

i tryed out your suggestion's but...wont work

allthough if i use this statement

document.getElementById('menukort').rows(i).cells(1).style.display = "none";
this works

im just not able to control the cols width's
???