I have an problem with an div. The div wraps the text fine if I do it the following way:
<div class="ChatBox">
<div id = "AllMessages" class ="AllMessages" style="position:absolute;width:100%;">fljadhfldhsfkljasdhfkjddasfasdfasafsdhasflhdasfhasdfjhdhasfkladfsdsf</div>
</div>
However, when I perform an AJAX call and use javascript to change the content of the div (insert the content that is returned by the AJAX call) the wrapping doesn’t work.
The result that is returned is an HTML-table if that has anything to say?
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('AllMessages').innerHTML=xmlhttp.responseText;
}
}
It just adds a scrollbar to the panel so it is possible to scroll to the right to see the whole content.
Hope anyone can help.
Thanks!
modify the css property to
hope this will work.