Thanks for your reply! Like I had said earlier, there's not really a way I can eliminate the second copy of the duplicated script as its generated out of an uncontrolled loop (thats how the system is). And doing so would not solve the problem either. The loops must happen.
I have tried fiddling around with a copy of that page locally, and it seems that the similar function names is not really a problem but its the display variable name (result1, result2, etc..) being similar in both the instances that is blocking the values to display for an older entry.
If I change them to being unique somehow, it starts displaying the value. For example, if you look at the function EpochToHuman1(), it is using the below code to capture the value from the element ID "result1".
document.getElementById('result1').innerHTML = outputtext;
And in my HTML, I have:
The above does the job fine, but for the second instance of the code, the result1 creates the block as it already has a value and overrides with the last one.
Now, I think dynamically changing all instances of resultx to being unique and having them inserted in the above two places throughout the loops should most likely resolve the problem. What do you think?
So the original code currently has result1, result2 etc.. in all functions for getElementById and they are being displayed as is. Need to figure out a way to dynamically replace the resultx thing with automatically incremental resultx's in the above two lines of code.