I would like to assign a width value to a div if another div has a "display:none;" style.
Here is what I have so far:
<script type="text/javascript" language="JavaScript">
function changeWidth()
{
if (document.getElementById("quoteCont").style.display = "none")
{
document.getElementById("detailAmen").style.width = "100%";
}
else
{
document.getElementById("detailAmen").style.width = "48%";
}
}
window.onload = function() {
changeWidth();
}
</script>
It doesn't seem to work what am I doing wrong?
Thanks Experts,
Brad