1

Topic: The filter dependent select option

Good afternoon! Is 2 select option:

<%Set rsRegions = dbS.Execute ("SELECT IDRegion, IDProvince, RegionFullName FROM Regions ORDER BY RegionFullName ASC") %>
<tr>
<td class=sum_r> Area: </td>
<td>
<%
sSQL = "SELECT P.IDProvince, P.ProvinceFullNameRU" &_
"FROM Provinces P" &_
"WHERE P.IDProvince <> 1" &_
"ORDER BY P.ProvinceFullNameRU"
exec rs, dbS, sSQL
%>
<select name = "IDProvince" id ='IDProvince ' class = "fld" style = "width:200;">
<option value = ' 1 '> - </option>
<% do until rs.eof
sSelected = sl (IDProvince = azero (rs ("IDProvince")))
wr "<option value = '" BOTH rs ("IDProvince") AND "'" AND sSelected AND ">"
wr KZ (rs ("ProvinceFullNameRU"))
wr "</option>"
rs. MoveNext ()
loop
%>
</select>
</td>
<td class=sum_r> Region: </td>
<td> <select <% =strAccess %> class=fld name = "IDRegion" style = "width:130;" <% if CStr (idbelong) <> "1" then %> disabled <% end if %>>
<% do until rsRegions.eof %>
<option value = "<% = rsRegions. Fields (" IDRegion ") %>" <%if CStr (rsRegions. Fields ("IDRegion")) =CStr (IDRegion) then %> selected <%end if %>>
<% =rsRegions. Fields ("RegionFullName") %> </option>
<% rsRegions. MoveNext ()
loop %>
</select>
</td>
</tr>

Prompt how it is possible to filter regions depending on the selected area, a sheaf of tables Provinces. IDProvince = Regions. IDProvince (without page reboot).

2

Re: The filter dependent select option

very _;
ajax to you in the help
https://www.w3schools.com/xml/ajax_intro.asp