Thanks for your help. I have pretty much written the perl code to generate an HTML file and written a javascript file to do the calculations. Just need to get the document.getElementById().value calls with computed ID strings to return something other than "undefined".