Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-31-2007, 02:57 PM #1
- Join Date
- Aug 2007
- Thanked 0 Times in 0 Posts
Child Menu Name Changes when parent Menu Changes
Hi everybody - I hope this is easy to do! • PHP • MYSQL •
THIS IS FOR A SEARCH RECORDS IN A DATABASE TO MATCH SELECTED CRITERIA OF A DYNAMIC OPTIONS LIST
I have a set-up whereby the <select name=" "> of the List determines which field of the datbase is searched. I've create a dynamic drop down menu whereby the Parent menu changes the values of the child menu - that works fine.
Problem is, I want the <select name=" "> of the child menu to change accordingly so that it searches the field determined by the parent selection.
HOURLY RATE -----------> £5.00 (searches the JOBS.hourly field)
ANNUAL SALARY --------> £10,000 (searches the JOBS.annually field)
The parent menu options are determined by a recordset from a SALARY table where salary.type is either "Hourly Rate" or "Annual Salary" and the same List menus are used to insert the hourly rate into the "JOBS.hourly field and the annually salary into the JOBS.annually" field of a new job availability.
So how do I get the child menu change it's name value when the parent menu is changed by the visitor? At the moment is is like this
And that searches the hourly field - but I need it to change when the parent menu is changed to Annual Salary to
09-01-2007, 05:42 AM #2
- Join Date
- Dec 2005
- Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
- Thanked 637 Times in 625 Posts
If that doesn't appeal to you, then you'll want to set up an onchange event on the Parent Select element that submits the form so you can reload the page using the Parent value in the Child query.