Question: I am working on a web application. I currently have two select dropdowns which are titled environment and region. I'd like to take their selected
I am working on a web application. I currently have two select dropdowns which are titled environment and region. I'd like to take their selected values and run a http GET request. I'd take the result of the get request to fill out a third dropdown called versions. The environment and region selected should modify the GET request which should automatically prepopulate the versions dropdown. I'd like to modify this url "https://datastore.example-domain.com/mycatalog/"+(Environemnt chosen)+"/"+(Region chosen). This should yield something like get https://datastore.example-domain.com/mycatalog/evironemnt/region. I don't have any experience with get requests so I'm wondering how to get this result then populate a dropdown with it. The return result should be something like a list of [1,2,3,4,5,6]. This is the code I have so far.
< div name="env" class="form-group"> < label class="col-md-4 control-label">Environment < div class="col-md-4"> < /div> < /div>
< !-- Select Basic --> < div name="region" class="form-group"> < label class="col-md-4 control-label">Region < div class="col-md-4"> < /div> < /div> < script>
function myFunction() { var x = document.getElementById("env").value;
}
function myFunction2(){ var y= document.getElementById("region").value;
} } < /script>
< !-- Select Basic --> < div name="version" class="form-group"> < label class="col-md-4 control-label">Version < div class="col-md-2"> < /div> < /div> < div id="version">
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
