Hello

I have attempted to make a Simple Interest Calculator using html forms and javascript and got stuck some where.Here the main problem is alert box does not pop up when i click the calculate interest button

Code:`<html>`

<head>Calculator Simple Interest

<script>

var p=document.getElementById("pa");

var n=document.getElementById("ny");

var r=document.getElementById("ri");

function si()

{

var s;

s=(p*n*r)/100;

alert("Total Amount is"+s);

}

function ta()

{

var t;

t=p+s;

alert("Total Amount is"+t);

}

</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>