0

I am figuringout why my code isnt working, I have tried numerous different variables and so on. I need help on why it is not calculating?

 <html>
<head>
<title> Quadratic</title>

<script type="text/javascript">
function Calculate() {
    var a =  document.getElementById("aBox").value;
    var b =  document.getElementById("bBox").value;
    var c = document.getElementById("cBox").value;
    var x = document.getElementById("xBox").value;  
    var y = 0;

    document.getElementById('outputDiv').innerHTML= 'result y = : 'y = ax2 + bx + c;">
}
</head>
<body>
<h2>Quadratic</h2>
<p>
 a: <input type="text" id="aBox" value="2">
<br>
 b: <input type="text" id="bBox" value="3">
<br>
 c: <input type="text" id="cBox" value="4">
 <br>
 x: <input type="text" id="xBox" value="5">
 <br>
 result y = : <input type="text" id="yBox" value="0">
</p>
<div id="outputDiv"> 
<input type="button" value="Calculate quadratic" onclick="Calculate();">
</div>
<hr>
</script>
</body>
</html>
2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.