Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dependant Drop Down Menu PHP/MySql

Status
Not open for further replies.

grobermatica

Programmer
Jul 26, 2006
16
GB
Hey,

I've got 2 dependant drop down menus (jump menus) on a php page the first I added and it works fine... adding a URL extension (?show=16) via the javascript mm_jumpmenu function.

However I now want to add another drop down menu to filter the results even further using a selection of dates from the recordset.

I have added the menu in the same way and it populates correctly but when I select an item from it it refreshes the page using another mm_jumpmenu function but it overwrites the extension that the first menu placed there and the same is true vice versa... both overwrite the extension that the other has added.

So how do I get the second menu to append its URL extension to the end of the URL generated by the first menu?

Any help greatly received.

Cheers


Craig
 
unless i have misunderstood this seems like a javascript question.

mm_jumpmenu is not a native javascript function either. no idea what it is. dreamweaver rubbish perhaps.
 
Hi

jpadie said:
this seems like a javascript question.
I would say, not. I think the OP has two menus, both adding its own parameter to the URL. So after the first click the PHP has to add the first parameter to the links generated for the second menu, so the second click propagates that too.

Feherke.
 
i understood one drop down to be 'category' or similar related, and the second to be date related. the OP wanted the second also to capture the setting of the first. in php, the only solution would create a cartesian product. probably undesirable. in js, setting the value of the first could automatically append to the second. simpler still would be a plain html solution where both selects are wrapped in a form and then the OP can do away with js altogether. but that wasn't what he asked.
 
So are we saying that its not possible to do what I want? Not sure what you mean by a cartesian product? I'm guessing a plain HTML would mean no database link?... if so not an option. If javascript is the way to go does anyone have any example code?

Cheers

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top