के लिए परिभाषित नहीं किया गया है, मैं निम्न 2 जैसे चयन 2 के लिए मान लोड करता हूं।चयन 2 अनचाहे क्वेरी फ़ंक्शन के साथ बहुत अलग कार्य करता है जो चयन
घोषित प्रकार
var AdjustmentType = Backbone.Model.extend({
url : Hexgen.getContextPath("/referencedata/adjustmenttype")
});
प्रकार
var adjustmentTypes = new AdjustmentType();
लोड के लिए उदाहरण बनाने बॉक्स Select2 के मूल्यों
adjustmentTypes.fetch({
success : function() {
for(var count in adjustmentTypes.attributes) {
$("#adjustment-type").append("<option>" + adjustmentTypes.attributes[count] + "</option>");
}
}
});
$("#adjustment-type").select2({
placeholder: "Select Adjustment Type",
allowClear: true
});
मेरे एचटीएमएल कोड
<div class="span4">
<div>ADJUSTMENT TYPE</div>
<select id="adjustment-type" tabindex="5" style="width:200px;">
<option value=""></option>
</select>
</div>
जब मैं पहली बार यह किसी भी अपवाद दे रही है नहीं है, लेकिन अगर मैं Refresh
या navigate to different URL
मैं निम्न अपवाद प्राप्त करने के लिए इस लोड:
Uncaught query function not defined for Select2 adjustment-type