Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
How can i do a dynamic dropdown in java?

Im wondering how to do a dymanic select. Im working with java using servlets and jsp. I know jquery is a good option for doing this but i dont understand how.

I have a parent table of nationalities that has the following fields, Nationality, state_id, city_id.

<div class="form-group">
              <label>Nacionalidad: </label>
              <select class="form-control col-8" name="Nationalities" required >
                <!-- Esto debería leerlo desde una DB -->
                
                        <option selected value="">Seleccionar...</option>
                        <%
                            for (Nationality : listaN) {
                        %>
                        <option value="<%=.getID()%>" ><%=m.getDescription() %></option>
                        <%
                            }
                        %>
              </select>
            </div>


<div class="form-group">
              <label>State: </label>
              <select class="form-control col-8" name="States" required >
                <!-- Esto debería leerlo desde una DB -->
                
                        <option selected value="">Seleccionar...</option>
                        <%
                            for (State: listaS) {
                        %>
                        <option value="<%=.getID()%>" ><%=m.getDescription() %></option>
                        <%
                            }
                        %>
              </select>
            </div>

<div class="form-group">
              <label>Cities: </label>
              <select class="form-control col-8" name="Cities" required >
                <!-- Esto debería leerlo desde una DB -->
                
                        <option selected value="">Seleccionar...</option>
                        <%
                            for (City: listaC) {
                        %>
                        <option value="<%=.getID()%>" ><%=m.getDescription() %></option>
                        <%
                            }
                        %>
              </select>
            </div>

I need to select a Nationality and depending in my selection the options in the next select should be specific for the selection before.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!