I'm trying to dynamically adjust the height of a container div based on the height of a datalist it contains. However, I don't have a default height set for the datalist, the height just flexes based on how many rows are returned. I thought I could just do an body onload statement like this:
onload="document.getElementById('detail_div').style.height = document.getElementById('DataList1').height;"
but this doesn't return anything. If I explicitly set the height of the DataList, then it works fine. How can I find out the height of my DataList if I don't set it when its created?
onload="document.getElementById('detail_div').style.height = document.getElementById('DataList1').height;"
but this doesn't return anything. If I explicitly set the height of the DataList, then it works fine. How can I find out the height of my DataList if I don't set it when its created?