Skip to content

Can't "link" the plugin to a selectbox after that selectbox is loaded by Ajax #1039

ghost opened this Issue Feb 13, 2013 · 3 comments

3 participants

ghost commented Feb 13, 2013

Hello everyone,
maybe I missed my answer somewhere in another post but I've got a problem to use the plugin with a selectbox which is loaded after an ajax request.
The selectbox is loaded after an occurrence of onChange event on another selectbox.
I don't understand where do I have to write the proper code to "link" the new selectbox with the plugin.

I have to precise that the selectbox doesn't exist at all before the ajax request

Thank you very much for your answer

stof commented Feb 13, 2013

Please read the Updating Chosen Dynamically section of the doc

ghost commented Feb 13, 2013

thanks but it doesn't help me.
I so this hints in another post but I haven't been able to resolve it.
the problem is that I need to apply the plugin on an element which is not exist in the first place. It only exist when I selected another select. I even try to put this line in the complete or the success callback method in the ajax options and it doesn't work.

@pfiller pfiller closed this Apr 16, 2013

can you post some example also linking this option i cant follow... those in the doc....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.