Java script help

I want to build drop down menus that are connected to graph…
You can see on the picture how it should look like…
There are going to be several curves…1…2…3…and user can choose in one of drop down menu
On x-axis is one value which i choose or enter in other drop down line and when i click OK i should get the value from y-axis based on the curve

Please HELP

I want to do this also…
if i enter a number A in box and on click on a button it writes value for B
A condition is stated…
so…if user enters 5.56 (variable A) and if a condition is (x > 5) && (x < 6) it writes 100 (variable B) and if user enters 3.45 it writes 200 for another condition

<form name=“jump”>
Unesite broj: <input name=“a” type=“text” />
<input name=“submit” type=“button” value=“submit” />

<script type=“text/javascript”>
var x = a.Value;
if((x > 5) && (x < 6))
document.writeln(“Uneti broj je veci veci od 5”);
else document.writeln(“Uneti broj je manji od 5”);