473,756 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dropdowns have to be populated through DataBase

4 New Member
Hi,

I am having 2 dropdowns on my page. The values in both the drop downs have to be populated through DataBase.

Problem : I dont know how to populate the second Dropdown automatically if items in first dropdown changes.

First DropDown : City names are getting populated as per user's country.

Second Dropdown : Market names to be populated here when a city name is selected in first drop down.

Please show me some way to populate the Market names as per selected city name in first drop down.
( I am not Using AJAX).

Many thanks for your help.

Regds
Vivek Jain
Jun 10 '09 #1
4 2023
RamananKalirajan
608 Contributor
Hi Vivek,
I think for this requirement you have to use AJAX. Because you are saying that you have all the values in the DB. Inorder to have a backend interaction without submitting a page it should be carried out through AJAX. Whats the backend language you are using...

Regards
Ramanan Kalirajan
Jun 10 '09 #2
d0353101
4 New Member
Thanks for reply.

I am using perl. I dont want to use AJAX as I dont know ABCD of it. I dont have much time to learn it as I have to deliver the page soon.

It would be very nice if you could suggest some solution to it without AJAX.

Regds
Vivek Jain
Jun 10 '09 #3
RamananKalirajan
608 Contributor
Its very hard to do without AJAX. Have you tried anything with property files. If you were using property file conept. It will be easy to do. But any how it will also involve ajax to load the files.


Regards
Ramanan Kalirajan
Jun 10 '09 #4
acoder
16,027 Recognized Expert Moderator MVP
You have three choices:
1. Use a submit button. This will pass the selection of the first drop-down to the same Perl page which you can use to populate the drop-down. No JavaScript involved, but it will involve a page reload.
2. Use onchange to trigger the submit. That's the only JavaScript involved, otherwise it's exactly the same as above.
3. Use a hidden iframe. A bit more complex, but you'd set the target to the iframe which would contain the results from the database which you can use to populate the drop-down. This would avoid a page reload, but there's a lot more JavaScript involved. If you go down this route, you're probably better off with Ajax.
Jun 10 '09 #5

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

Similar topics

3
2197
by: Kingdom | last post by:
I don't want to try and reinvent the wheel so I'm looking for an ASP 3 script that will dynamicaly populate a nubmer or dropdown boxes from an access database, read a price from the the database and write both the selection and the price to a form and total all the prices too. Any help apreciated, any other features a bonus, eg display images etc.
0
914
by: Jeffrey | last post by:
Hi... I have several dropdowns located in a datagrid footer. Now say i modify the selection in dropdown1. I want to refresh the content of the other dropdowns with the result of a database query. How can i do it? Thanks Jef
3
1590
by: Damon | last post by:
I am working on a site in which I would like to have two dropdowns that will allow a user to navigate through the administrative pages of the site. The first would allow the user to choose the particular site that they would like to edit. The second would allow the user to select which admin screen they would like to edit. The second dropdown needs to be populated based on the selection in the first one. I want to encapsulate these...
2
1275
by: Anup | last post by:
In my application there are many inter-dependent dropdowns. ie:- when user select value form dropdown1 according to that a query is fired and the data is populated in dropdown2 by applying the value selected in dropdown1 as filter. Now the user wants this process to be done at client-side as there are too many dependencies. (There is a database table in my project which stores all there dependencies.)
7
1400
by: chhatra | last post by:
I have 8 dropdowns to be filled from database . To avoid roundtrips to the database what i should use?
0
970
by: sbart | last post by:
I am programing in asp.net vb using AjaxToolkit cascadingDropDown. I do not have access to AjaxToolkit cascading dropdown event handlers. I have a series of dropdowns. The selection from one of the dropdowns (call it ddA) triggers the visibility of some of the other dropdowns. Problem is that f the user makes one selection from ddA, makes selections from additonal dropdowns, then goes back and changes the selection in ddA, the selections...
4
4586
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet reservation of available resources (laptops, beamers, etc). The MySql database queries are already in place, as is the ASP administration panel. The frontend that users will see however, still needs some work. I'm really close, but since I'm no...
1
1705
by: d0353101 | last post by:
Hi, I am having 2 dropdowns on my page. The values in both the drop downs have to be populated through DataBase. Problem : I dont know how to populate the second Dropdown automatically if items in first dropdown changes.
2
2020
by: naikdarshan229 | last post by:
I have a data grid which is populated from one table in a database,
0
9431
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9689
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7226
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.