Quantcast
Channel: The Weber Report » PHP
Viewing all articles
Browse latest Browse all 11

This Weeks "Struggle"

$
0
0

This week at work I've been struggling with a relatively simple problem that is disturbingly difficult to solve (at least as a humble web developer like myself).

Basically, I need to generate a dynamic, database-driven, menu system that will allow me to make some highly complex (tree-like) decisions based on user decisions.  Ok, stated out like that, it may seem to be a complex problem.. but it's not, I promise.

In more simple terms, I need a drop-down menu system that will allow a user to “drill-down” to the proper final output without having to click on twelve submit buttons and having a lot of constraints on what they can pick depending on what was chosen in the last drop-down.   I'm attempting to mix some Script.aculo.us, AJAX, and a Pear tree (a PHP plugin which was last updated on 3/17/03 as a beta). 

Let me give a real world example of what I'm trying to do.  You can imagine my problem by thinking about how you would implement a car repair web site.  If you wanted information about your 2002 Ford Mustang's automatic transmission: you would first pick “2002″, which would then fade in a new drop-down with all the valid 2002 car models… so then you pick “Ford”… which would then fade in another new drop-down with all of the valid 2002 Ford models… now you pick Mustang… we get a new drop-down with the different 2002 Ford Mustang models… I think you get the idea.

The real problem is in doing this efficiently, elegantly, and enhancing the experience with a touch of Scriptaculous.  It's tougher than you might guess.  I'll let you know how it ends up!

A special note to Jim: Yes, I know this problem might be easier solved in Rails, but who says a challenge isn't fun?


Viewing all articles
Browse latest Browse all 11

Trending Articles