Hi Marco, so yeah it sounds like you need to call your init() function earlier than you're doing it currently. You can do that by taking it out of where you're currently calling it from and instead call it directly below the function like this:
code:
<head>
<script>
function init()
{
<.....>
}
init();
</script>
</head>
That should then run it before you need it in document.write() below. But if your init() function has some parts where it's also filling in UI controls, split that part into a second init function and you can then call that second one in onload="" or wherever you're doing it currently. It shouldn't be necessary to make a second page I don't think, just split your initialization into 2 functions and call one earlier in the page load than is happening currently.
- Michael
|