Welcome Guest, Not a member yet? Register   Sign In
chained Multi select box in codeigniter
#1

[eluser]oldrock[/eluser]
I am using codeigniter for my development, here i have a view which consists of 5 multiple select box, in which initially the default data will be populated while the page is loading and it should be chained selected i.e based on the first multi select box changes the data should be populated in the remaining 4 select box,second box changes will reflect in the remaining three and so on.


please can you help me to obtain the chained selections for all the five boxes in which the data will be populated from model via controller. The interacts with java service to fetch the data


thanks in advance
#2

[eluser]toopay[/eluser]
If you have better understanding of ajax, that will be a breze task. The main flow of that task is :

1. When user selecting one value of first multiselect box, it trigger an ajax call to your controller (or your SOAP, or REST service, if you have one).

2. Server give a (a or) synchronous response back to your success function of previous ajax call, then it trigger a (javascript) function that manipulating dom, populated the incoming data and display it to the second multi select box.

3. And so on...

If you using popular javascript framework, like Dojo, ExtJS or jQuery, performing an ajax call is just took several line. Or if you use plain javascript, it only several more lines longer. Search on the web, there are tons of that, okay? ;-)

If in another day, you receive an unsual PHP error, like "Paamayim Nekudotayim", then you can came back here.




Theme © iAndrew 2016 - Forum software by © MyBB