Hi to all,
I want to create a jsp page where user will insert in second combo box his choice and then based on his selection, in the third combo box there will be only choices that are connected with choice from second combo-box.
here is the code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Unos kandidata</title>
</head>
<jsp:useBean id="autoskole" class="autoskola.managers.SveAutoSkole" scope="page"/>
<jsp:useBean id="kategorije" class="autoskola.managers.SveKategorije" scope="page"/>
<jsp:useBean id="instruktori" class="autoskola.managers.SviInstruktori" scope="page"/>
<body>
<form action="/AutoSkola/KandidatServlet" method="post">
Unesite podatke za novog kandidata:
<br>
<br>
<table>
<tr><td>Ime</td><td><input type="text" name="ime"></td></tr>
<tr><td>Prezime</td><td><input type="text" name="prezime"></td></tr>
<tr><td>Adresa</td><td><input type="text" name="adresa"></td></tr>
<tr><td>Telefon</td><td><input type="text" name="telefon"></td></tr>
<tr><td>Jmbg</td><td><input type="text" name="jmbg"></td></tr>
<tr><td>Email</td><td><input type="text" name="email"></td></tr>
<tr><td>Izaberi autoskolu:</td>
<tr><td>
<select name="bpautoskola">
<c:forEach var="bpautoskola" items="${autoskole.sveAutoskole}">
<option value="${bpautoskola.idSkole}" >${bpautoskola.naziv}</option>
</c:forEach>
</select>
</td>
<tr><td>Izaberi kategoriju:</td>
<tr><td>
<select name="bpkategorija">
<c:forEach var="bpk" items="${kategorije.sveKategorije}">
<option value="${bpk.idKategorije}" >${bpk.oznakaKategorije}</option>
</c:forEach>
</select>
</td>
</tr>
<tr><td>Izaberi instruktora:</td>
<tr><td>
<select name="bpinstruktor">
<c:forEach var="bpi" items="${instruktori.sviInstruktori}">
<option value="${bpi.idInstruktora}" >${bpi.ime} ${bpi.prezime}</option>
</c:forEach>
</select>
</td>
</tr>
</table>
<br>
<br>
<input type="submit" value="Sacuvaj">
</form>
${poruka}
</body>
</html>
He reads all from local database, and I'm trying to find a solution for my problem... Language is Serbian, I have a Driving school where user will select category that he wants, then he will select driving school from combo box, and then he will have choice to select driver instructor who works at that school...