Closed randyDarsh closed 11 years ago
I am trying to populate select boxes using jquery get, and everything returns from the server fine, but the select boxes do not update.
Here is the form:
and here is the jquery
$.fn.populateListsBasic = function(){ $.get("../cfc/mycfc.cfc",{ method: "getData", data: conditionGroup.filter(':checked').val() },function(data){ $.each(data.stuff.otherStuff1,function(key,value){ $("#select1").append("" + value + " (" + data.stuff.otherStuffCount_1[key] + ")"); }); $.each(data.stuff.otherStuff2,function(key,value){ $("#makes").append("" + value + " (" + data.stuff.otherStuffCount_2[key] + ")"); }); },"json"); };
$("#form1").populateListsBasic();
This is not supported (yet). There are other similar issues opened. I suggest you use Select2. Check here https://github.com/elclanrs/jq-idealforms/issues/102
I am trying to populate select boxes using jquery get, and everything returns from the server fine, but the select boxes do not update.
Here is the form:
and here is the jquery
$.fn.populateListsBasic = function(){ $.get("../cfc/mycfc.cfc",{ method: "getData", data: conditionGroup.filter(':checked').val() },function(data){ $.each(data.stuff.otherStuff1,function(key,value){ $("#select1").append("");
}); $.each(data.stuff.otherStuff2,function(key,value){ $("#makes").append(""); }); },"json"); };
$("#form1").populateListsBasic();