I'm having trouble storing values input through a dropdown menu in variables event1 and event2, despite trying global declarations. How can I successfully store a value to both variables and pass it to the JavaScript code? Thank you.
<!DOCTYPE HTML>
<html>
<head>
<title> Correlation Does Not Imply Causation </title>
<script type="text/javascript">
var event1,event2;
function main(e11,e22)
{event1=e11;
event2=e22;}
// Rest of the JavaScript code
window.onload = function () {
// More JavaScript code
}
</script>
<script type="text/javascript" src="C:\Users\Rishika\Downloads\canvasjs-1.7.0\canvasjs.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'>
</head>
<body bgcolor="#3B5998">
<div style="color:white; font-family: 'Montserrat', sans-serif;"><center>
<p style="font-size:40px"><b><br/><br/><br/><br/>CORRELATION DOES NOT IMPLY CAUSATION</b></p>
Statistically determine the relation between two random events
<br/><br/><br/>
// Dropdown menu and form elements here
<div id="chartContainer" style="height: 300px; width: 100%;">
</div>
</body>
</html>