Multi-level linkage pull-down selection box to dynamically obtain the next level. Each level of data is XML, which can support unlimited levels (the browser side needs to support)
The project requires a material category table, level three, with a total of more than 7,000 records. If it is obtained at one time, it will be very slow, so it uses dynamic reading, read level one each time, and uses cache on the server side, which is quite efficient.
The HTML code is as follows:
<select name="MaterialClass1" ChildSelectName="MaterialClass2"></select>
<select name="MaterialClass2" ChildSelectName="MaterialClass3"></select>
<select name="MaterialClass3"></select>
'
Where ChildSelectName represents the name of the next level Select
One of the xmls is as follows:
<MaterialClasses>
<MaterialClass MaterialClassCode="01" Description="Black and Nonferrous Metals"/>
<MaterialClass MaterialClassCode="02" Description="Cement, gravel bricks, concrete"/>
<MaterialClass MaterialClassCode="03" Description="Wood, Bamboo and its Products"/>
</MaterialClasses>
Download the full source code