Magical list generator using jquery

lisa Lisa, 20th November 2007

Just found this simple but effective javascript code, utilising the invaluable jquery library to create linked select lists. You select the first list and it magically goes off and generates the options in the 2nd and 3rd lists. This in itself isn't anything particularly ground breaking, but this code connects to the database on-demand, then generates the menu options via a JSON response. I've just downloaded the code and at first glance it looks very tidy. I'm not sure where I'll manage to build this into a site just yet, but it's nice to know if I ever do need it, there is a solution out there. Maybe it could be used on registration forms where you want people to specify where they live... Getting the data itself could be tricky. Or maybe selecting categories/sub categories for a search. If only they had UK counties and cities in the attached db file too, now that would be handy! :) Anyway here's the code

More from our blog

18a win Netty 2024 award for Activibees.com

18a win Netty 2024 award for Activibees.com

29.02.24

We are delighted to announce that 18a has been recognised for its outstanding work in the "Web Design Agency of the Year - UK" category at… Read →

Generating an Effective Content Security Policy with your Laravel React App

Generating an Effective Content Security Policy with your Laravel React App

27.02.24

I recently had an interesting problem to solve. I'd built a brand new author website on a shiny installation of Laravel 10, utilising its out-of-the-box… Read →

If your WordPress website looks broken, it could be because of this.

If your WordPress website looks broken, it could be because of this.

15.02.24

WordPress is the incredibly popular blogging-come-full-website platform that powers over 835 million websites* in 2024. It's functionality is extended by plugins, and one such very… Read →