I have a drop down menu for the country and state. Our user interface designer used a jcf plugin that hides real selection cells and transforms it into a control that looks and acts like a drop-down list. It works great when I don't need to dynamically populate these checkboxes from the client side.
I have a drop-down list of the country and based on the selected list, which should fill my state. with jcf, I could see that the real drop-down list (which is located to the left of -9999px) is full, but only the first parameter appears in the control that replaces this. Does anyone know how to display / populate a modified control.
Thank,
: , , .
$('#myselectbox')[0].jcf.buildDropdown(); // Rebuild based on options $('#myselectbox')[0].jcf.refreshState(); // Updates to current selected
, .
jcf.customForms "", , . , (psdtohtml) , HTML. , - javascript, .
, console.debug(jcf.customForms);, . , .
console.debug(jcf.customForms);
//jcf.customForms.setOptions(states[0]); //jcf.customForms.refreshAll(); //jcf.customForms.refreshElement(states[0]); //states.refreshState();
, , initTabs();, select.
initTabs();
:
jcf.customForms.replaceAll(); initSlideShow(); initInputs(); initSameHeight(); initTabs(); fixSelect();initCounter(); initOpenClose();
This is the code that worked for me. Code field specifies a value select, then refresh, and it changes the value with the field jcf, selectwhich would be selected with the option which has the value 42
select
refresh
jcf
jQuery("#select-element").val("42"); jcf.getInstance(jQuery("#select-element")).refresh()
Only one line works for me. and his general decision.
$(document).ajaxComplete(function() { jcf.customForms.replaceAll(); });
Hooray!!!