Multi-level linkage drop-down selection box, dynamically obtain the next level, each level of data is XML, can support unlimited levels (the browser needs Microsoft.XMLDOM support)
project needs, a material category table, three levels, a total of more than 7,000 items Records will be very slow if retrieved at one time, so dynamic reading is used, one level is read at a time, and the server uses caching, which is very efficient.
The HTML code is as follows:
<select name="MaterialClass1" ChildSelectName="MaterialClass2"></select>
<select name="MaterialClass2" ChildSelectName="MaterialClass3"></select>
<select name="MaterialClass3"></select>
'www.downcodes.com
Among them, ChildSelectName represents the name of the next-level Select.
One of the xmls is as follows:
<MaterialClasses>
<MaterialClass MaterialClassCode="01" Description="Black and non-ferrous metals"/>
<MaterialClass MaterialClassCode="02" Description="Cement, sand, gravel, bricks, concrete"/>
<MaterialClass MaterialClassCode="03" Description="Wood, bamboo and their products"/>
</MaterialClasses>