Your main problems are that you are trying to get the values of p, n and r as soon as the page loads (when they do not even exist at that moment) instead of when the function runs.
Also, the values calculated by one function are not somehow retained for use by the second function - you must work out the interest again. Once a function ends the values of any local variables ae lost.
Also, values entered by the user are
strings unless converted to numbers.
Code:
<html>
<head>Calculator Simple Interest
<script>
function si() {
var p=Number(document.getElementById("pa").value);
var n=Number(document.getElementById("ny").value);
var r=Number(document.getElementById("ri").value);
var s=p*n*r/100;
alert("Total Interest Amount is "+s.toFixed(2));
}
function ta() {
var p=Number(document.getElementById("pa").value);
var n=Number(document.getElementById("ny").value);
var r=Number(document.getElementById("ri").value);
var s=p*n*r/100;
var t = p+s;
alert("Total Amount Payable is "+t.toFixed(2));
}
</script>
</head>
<title>Simple Interest Calculator</title>
<body>
<form>
<b>Principal Amount</b><input type="number" id="pa">
<b>No. of years</b><input type="number" id="ny">
<b>Rate of interest</b><input type="number" id="ri">
<input type="button" onclick="si()" value="Calculate Interest">
<input type="button" onclick="ta()" value="Final Amount">
</form>
</body>
</html>
"What's the three words you never want to hear while making love? Honey, I'm home." - Ken Hammond.