Ajax select and select (dropbox) |
[eluser]nubianxp[/eluser]
Can anyone point me to some sample CI implementation where an ajaxed select dropdown option opens up another select dropdown depending on the first one? Thanks!
[eluser]TheFuzzy0ne[/eluser]
Unlikely, as the Ajax wouldn't have anything to do with CodeIgniter as such. You could also implement it in pure JavaScript (no Ajax required), thus making everything faster.
[eluser]nubianxp[/eluser]
[quote author="TheFuzzy0ne" date="1239816662"]Unlikely, as the Ajax wouldn't have anything to do with CodeIgniter as such. You could also implement it in pure JavaScript (no Ajax required), thus making everything faster.[/quote] Thanks for the quick reply, it would be nice to do in javascript but the problem is that the selections are generated dynamically and pulled from the database depending on what the selection is. The scenario is that I have search form with a list of Islands and then each island has its own region which in turn has its own areas and subareas and this in turn will generate the query. Anyways, any pointers to places where this kind of thing got implemented using javascript? Thanks.
[eluser]SteveBluck[/eluser]
I would also be interested in something like this. I cant find anything on google.
[eluser]nubianxp[/eluser]
[quote author="TheFuzzy0ne" date="1239818372"]http://www.dhtmlgoodies.com/scripts/ajax...elect.html http://www.ajaxf1.com/tutorial/ajax-mast...elect.html http://www.satya-weblog.com/2007/04/dyna...st-by.html[/quote] Ok, will be reviewing this. Thanks for taking the time man, appreciate it.
[eluser]Berserk[/eluser]
Roadmap: select an option from Selection A -> call an ajax function with onchange event of Selection A -> display results from ajax function on Selection B an example with xajax: Controller Code: //Ajax function to get albums list by an artist Views: Code: //Display Artists List hope it'll help
[eluser]nubianxp[/eluser]
Thanks berserk, I'm trying xajax out now, it's a bit confusing since I'm using the form helper with it, and there's the issue of the event handler. BTW, on the onchange code, I noticed you used: Code: xajax_get_artist_albums(this.options[this.selectedIndex].value) Code: xajax_get_artist_albums(this.value)
[eluser]Berserk[/eluser]
no, i used for a test.and "xajax_" is default prefix |
Welcome Guest, Not a member yet? Register Sign In |