Before encountering a wonderful problem, jquery's Chzn-select query failed. Originally with jquery chosen, very useful, this select can automatically query matching, more convenient than select2.
However, some places are used but can not be queried, and some places to be able to find a long time or not find out why. With the Firebug, and check the code, the cost of a lot of trouble, and finally found the problem.
This is the original code.
<td><select class= "Chzn-select" id= "Industryid" name= "Industryid" data-placeholder= "Industry" style= " vertical-align:top;width:175px; " ><option value= "" > Industry </option><c:foreach items= "${listindustry}" var= "Industry" > <c: If test= "${parammap.industryid==industry.industryid}" >selected</c:if> > ${industry.industryname} </option></c:forEach></select></td>
After modification
<td><select class= "Chzn-select" id= "Industryid" name= "Industryid" data-placeholder= "Industry" style= " vertical-align:top;width:175px; " ><option value= "" > Industry </option><c:foreach items= "${listindustry}" var= "Industry" ><option Value= "${industry.industryid}" <c:if test= "${parammap.industryid==industry.industryid}" >selected</c:if > >${industry.industryname}</option></c:foreach></select></td>
Move the position of the value to the same line as selected, and there will be no reason for the search to fail. This kind of situation, really lets the human tears rush! If you can explain the reason, please reply to share!
A wonderful problem, jquery's chzn-select query invalidation