I have a form comprising of a dropdown menu (where u can select a parameter to plot in a graph) and two radio buttons (to decide whether or not the graph is autoscaled. If not, there is a text box where you can define the scale). When I change the parameter in the dropdown, the graph is automatically redrawn with the new parameter.
However I want the radio buttons to be reset, so if I chose a manual scale, and I change my parameter, it changes back to autoscale. Is this possible?
Here is part of my form code:
<select id="Graf1" onchange="makeChoice5();updateSelect(this,'Graf2');this.form.submit();" name="graf1">
<option value="other">---------- Kies ---------- </option>
<option value="1">Temperatuur</option>
<option value="2">Relatieve vochtigheid</option>
<option value="3">Straling</option>
<option value="4">Dendrometer 1</option>
<option value="5">Dendrometer 2</option>
</select>
</br>
<input type="radio" name="schaal" value="1" checked="checked" onclick="makeChoice();">Automatische schaal </br>
<input type="radio" name="schaal" value="other" onclick="makeChoice();">Handmatig
<input type="text" name="schaalmin" size="6" value="---Min---" onclick="clickclear(this, '---Min---')" onkeydown="return ( event.ctrlKey || event.altKey
|| (47<event.keyCode && event.keyCode<58 && event.shiftKey==false)
|| (95<event.keyCode && event.keyCode<106) || (event.keyCode==8)
|| (event.keyCode==9) || (event.keyCode>34 && event.keyCode<40)
|| (event.keyCode==46)
|| (event.keyCode==110) )">
<input type="text" name="schaalmax" size="6" value="---Max---" onclick="clickclear(this, '---Max---')" onkeydown="return ( event.ctrlKey || event.altKey
|| (47<event.keyCode && event.keyCode<58 && event.shiftKey==false)
|| (95<event.keyCode && event.keyCode<106) || (event.keyCode==8)
|| (event.keyCode==9) || (event.keyCode>34 && event.keyCode<40)
|| (event.keyCode==46)
|| (event.keyCode==110) )">
I found the solution, I just used this small easy function, which is called on changing the dropdown.. This way when I change the parameter, the right radiobutton is selected (in stead of trying to unselect the other ones):