473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

How to work dependent dropdowns and still to retain user input in a form?

3
I am currently designing a real estate website using Dreamweaver CS3, php, MySQL on a Mac. On it is a 'property search' form that queries the property database. The form consists of 5 dropdown lists. The first dropdown (buy or let) is a parent list and the 3rd and 4th dropdowns (minimum price and maximum price) are child lists - they are dependent on what is chosen in the 1st dropdown. I have got it working with an onchange event and javascript but I am experiencing problems when it comes to retaining the information the user has put into the form. It all works fine except for when the user choose 'let' (in 1st dropdown) it's min and max prices are not retained because their values are found in the javascript.

Is there not an easier way of doing a parent child dropdown and retaining the choice the user has made from page to page? Do I use hidden fields? I can't populate the drop downs dynamically as minimum and maximum prices are not in the database - there is just a single price for the property.

I have attached code from my form and javascript

Please help.

Thanks
Attached Files
File Type: txt dependent dropdowns.txt (7.2 KB, 363 views)
Apr 9 '08 #1
5 1847
Markus
6,050 Expert 4TB
I believe there's too much code there. ma' man!

Remember to post just the relevant code; if its a whole load of code people just arent going to read it.

Remember code tags, also!
Apr 9 '08 #2
ronverdonk
4,258 Expert 4TB
When you want to post that many code lines, store it into a separate .txt file and add that file as an attachment to your post.

moderator
Apr 9 '08 #3
Bels
3
Thanks for the advise. Being new to the site it is great to have feedback.

I have added the code I am having a problem with ie the form and javascript - should I resubmit the question with an attached file or are you able to help me from here.
Apr 9 '08 #4
ronverdonk
4,258 Expert 4TB
Please resubmit the question with the code file attached.

moderator
Apr 9 '08 #5
Bels
3
I have edited my question and added an attachment of my code.

Hope you are able to help.

Thanks
Apr 9 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

19
by: Chris Allen | last post by:
Hi I'm new to PHP and I'm trying to create a Login Form. Once the user has logged in then he shouldn't have to log in again. The trouble is I'm getting a new session ID between every page and so...
3
by: Iver Erling Årva | last post by:
Can anyone please tell me why this doesn't work? The sign changes when I hit the button, and I get no error messages, but the textarea doesn't disappear/reappear. <html> <head> <title>New...
14
by: Steve Jorgensen | last post by:
Recently, I tried and did a poor job explaining an idea I've had for handling a particular case of implementation inheritance that would be easy and obvious in a fully OOP language, but is not at...
2
by: kevin carter | last post by:
Hi we have a form that accepts inputs from the user at the end of the day the data that has been input is stored on a table,(all textboxes are bound to the table) THe next day a clear form is...
1
by: Hifni Shahzard | last post by:
Hi, I'm using VS.NET 2003, SQL Server 2000, Windows xp professional; My Question: Some of you might seen in some websites where it requests the Country in a dropdown. If the Country selected,...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: rn5a | last post by:
When a Button is clicked in a Form, the JavaScript 'prompt' dialog pops-up for users to enter any text. When the user clicks OK in the prompt dialog, the text is populated in a TextBox & the Form...
0
by: GOgier | last post by:
I am new to VB and struggling with the following Word form problem: I am designing a Word form whereby the collective values from 10 different dropdowns must be tested to ensure that any 2...
3
by: raaman rai | last post by:
Hi Fellas, i need to understand how to retain the submtted form values during an Edit/Update operation. When i add the information from a form, i retain the form values in the following way incase...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.