You have 2 conflicting onload handlers. There must be only one onload handler.
<BODY bgcolor="white" onload
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.