I am new to programming, so if there is a better way to do this, I would be very grateful for the suggestion. I searched for many hours, but I cannot find a solution in which the third item in the list depends on the first two.
My goal is for the OS parameter to depend on the first two options (network and resource). There are 2 networks - internal and firewall, and if necessary, servers can also be grouped. If a standard is selected, you can choose physical or virtual. If a cluster is selected, the only option is physical.
Where I ran into problems with choosing an OS. If a combination of firewall and virtual machine is selected, only Linux and Windows are available. If a combination of firewall and physical hardware is selected, AIX, Solaris, Windows, and Linux are allowed. When I click on a resource to change it to physical, I want the OS changes to change.
HTML code
<div class="left_box"> <body onload="fillCategory();"> <div id ="formWrapper"> <FORM name="drop_list" action="availability.php" method="POST" > <fieldset> <label>Network</label> <SELECT class= "formSelect" NAME="build" onChange="SelectSubCat();" > <Option value="">Select Internal or Firewall</option> </SELECT> <br> <br> <label>Resource</label> <SELECT class= "formSelect" id="resource" NAME="resource"> <Option value="">Resource</option> </SELECT> <br> <br> <label>OS</label> <SELECT class= "formSelect" id="OS" NAME="OS"> <Option value="">OS</option> </SELECT> <br> <br> </fieldset>
Javascript Code
function fillCategory(){
source share