Welcome Guest, Not a member yet? Register   Sign In
How do I re-populate an AJAX-based drop-down?
#1

[eluser]KeyStroke[/eluser]
Hi,

I have two form drop-downs: "categories" and "sub categories". "Categories" has a fixed number of item. "Sub categories" is populated through AJAX depending on which category you choose.

My question is, how would you repopulate the "sub categories" drop down in case of error since it depends on AJAX?


Your help is much appreciated
#2

[eluser]Bramme[/eluser]
search the forums, I have written a little piece of code for this using jquery before. Lemme see if I can find it back quickly.

Edit: it was for you, why did you never check your old topic again?
http://ellislab.com/forums/viewthread/81038/
#3

[eluser]KeyStroke[/eluser]
Oh sorry. I didn't recieve any notifications after my reply. Weird.

I'll study your code and see if I can integrate it into my project. Thanks Bramme.

In the mean time, if anyone can think of a quick way to do this through jQuery/CodeIgniter, please let me know.




Theme © iAndrew 2016 - Forum software by © MyBB