I make a webpage which reads text from file and display it into a div
the problem is that div content is wider than the div itself I have tried many codes but it works only if the content is pre-inserted into div
the code i wrote in javascript is this
the problem is that div content is wider than the div itself I have tried many codes but it works only if the content is pre-inserted into div
the code i wrote in javascript is this
Code:
<script type="text/javascript" language="javascript">
srcFrame;
//External content into a layer
function loadOuter(doc) {
srcFrame = document.getElementById("hiddenContent");
srcFrame.src = doc;
// workaround for missing onLoad event in IFRAME for NN6
if (!srcFrame.onload) {
setTimeout("transferHTML()", 1000)
}
}
function transferHTML()
{
srcContent='';
if (srcFrame.contentDocument)
{
srcContent=srcFrame.contentDocument.getElementsByTagName("BODY")[0].innerHTML;
}
else if (srcFrame.contentWindow)
{
srcContent=srcFrame.contentWindow.document.body.innerHTML;
}
document.getElementById("Day").innerHTML =srcContent;
}
</script>