You have 2 conflicting onload handlers. There must be only one onload handler.
window.
onload = fill_table;
</SCRIPT>
</HEAD>
<BODY bgcolor="white"
onload="userprompt()">
The last onload handler will override the existing one, so in this case userprompt() will be executed but fill_table() won't be.
Since userprompt() uses document.write statements to display data, calling it after the page has loaded will erase the current content.
So it should be called
AS the page is loading (and the window.onload=fill_table as is), though I don't generally advise to use prompts and later document.write the inputs, but I know this is the requirement of the assignment.
Code:
<BODY bgcolor="white">
<script type="text/javascript">
function userprompt(){
...
}
userprompt();
</script>
</body>