having problems with my DIV's it seems to interfer with another DIV.
the resize functions do not work using the following code, but if i put the .divclass content in a style within the div instead of using class, all works but then does not validate with w3.org
can anyone see why this would be?
<script language="JavaScript" type="text/javascript">
function Div(id,hw,ud) {
var div=document.getElementById(id);
if (hw == "h"){
var h=parseInt(div.style.height)+ud;
if (h>=150){
div.style.height = h + "px";
//alert(hw + h);
}
} else if (hw == "w"){
var w=parseInt(div.style.width)+ud;
if (w>=150){
div.style.width = w + "px";
var inputdiv=document.getElementById('txt_message');
var inputw=parseInt(inputdiv.style.width)+ud;
if (inputw>=150){
inputdiv.style.width = inputw + "px";
}
//alert(hw + h);
}
}
}
</script>
.divclass { height: 300px; width: 500px; overflow: auto; background-color: #CCCCCC; border: 1px solid #555555; }
<div>
resize chat log <img src="resize_d.gif" width="21" height="9" onclick="Div('div_chat','h',20);">
<img src="resize_u.gif" width="21" height="9" onclick="Div('div_chat','h',-20);">
<img src="resize_r.gif" width="21" height="9" onclick="Div('div_chat','w',20);">
<img src="resize_l.gif" width="21" height="9" onclick="Div('div_chat','w',-20);">
</div>
<div id="mydiv" class="divclass "></div>