Ok so basically I have 3 lists that are drop down lists and each consecutive menu is contextual to the one before it. Does this make sense?
It's for an online website to help students find resources for university admissions.
So basically list one the user selects what they want to be which open up list 2 of what the degree is called and then the 3rd list opens of what university offers that course...then they hit search and it has the information on that course from that university that opens in a seperate page.
Anyone have any ideas on how to do this?? Any help is hugely appreciated!
You'd start by listing all "jobname"s in one dropdown list.
When the user picks an option, it triggers a function which loads all "crs"s from the selected job. Picking an item from that list would then bring up a list of "uni"s to choose from. Picking a uni would then take you to a search results page (you'd need to pass the university and coursename as url parameters) which would then display the course details.
There's probably a better way to do it - but you'd be better off asking on a javascript forum.
Thanks for the help. Yes I am looking to do it in any language really, but not MMF. I assumed I'd need to use XML and then another language to use the XML (however it does it). I'll keep looking around.
For a bit I figured it'd be easier to use flash, but I'm starting to think Java would be much easier....blargh
thinking is like pong, it's easy, but you miss sometimes.
Using PHP I would populate the dropdown lists using an AJAX callback. Quite simple really, all you ought to do is write a page that generates the dropdown list for you from a given selection like:
generateList2.php?sel1=...
generateList3.php?sel1=...&sel2=...
So you pass the selected item index or something from list 1 to the script in an AJAX callback. The page you query generates the html for the dropdown lists, and you just replace the contents of the list container with the new list.
That's my preferred method anyway, I don't like fiddling about with javascript to parse XML and so on, I like to keep all my data in a database, although it would be more responsive to load all the data in xml format at the start. You could always just generate a javascript list in PHP.