SuperSal
Programmer
- Mar 13, 2007
- 33
Hi everyone, bit of a strange problem i have come across. I am creating a website where the html is auto generated by a number of javascript functions. The functions are called in the body onload event and the css is specified in an external css file. The problem is that when the page loads the html is generated on the onload event therefore the stylesheet is not being applied to the html. Is there anyway to get the stylesheet to be applied for the html that is generated in the javascript function?
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" src="../Scripts/menuitems.js"></SCRIPT>
<LINK rel="stylesheet" type="text/css" href="../Stylesheets/Forms.css">
</HEAD>
<BODY onLoad="renderNetwork();">
<script>
var dstr=""
function renderNetwork()
{
//function code here to generate html
}
</script>
</BODY>
</HTML>
Thanks
Sally
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" src="../Scripts/menuitems.js"></SCRIPT>
<LINK rel="stylesheet" type="text/css" href="../Stylesheets/Forms.css">
</HEAD>
<BODY onLoad="renderNetwork();">
<script>
var dstr=""
function renderNetwork()
{
//function code here to generate html
}
</script>
</BODY>
</HTML>
Thanks
Sally