473,804 Members | 3,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show/hide and update combo box

14 New Member
Hello all,

I have a situation and I'd appreciate it if any of you could help me. I am not sure if this is js or html but here goes. I have a main combo box (mcb) which I'm displaying some values.

Based on what the user chooses, 2 combo boxes should be displayed on same page. The first combo box (CB1), should be filled with some values. The second, (CB2) however, should get loaded on basis of what is chosen in CB1. UNtil then, CB2 should be empty (but visible). When user chooses a value in CB1, and then CB2, a 3rd combo box, CB3 should be displayed. CB3 will have values already, based on what is chosen in CB2. If use decides not to select any value from CB2, CB3 is not displayed at all.

Until now, this is what I have done.

1. I have the main combo box (mcb).
2. In Onchange event of mcb, CB1 and CB2 get displayed. CB1 has values, CB2 does not.
3. In OnChange of CB1, CB2 gets populated.

Thats all. Now I want a CB3 to be displayed with values in it, depending on if and what the user chooses in CB2.

Can anyone help? :)

Thanks!
Trupti
Sep 22 '09 #1
10 7134
ssnaik84
149 New Member
are you using AJAX or normal ASP.NET stuff?
Sep 22 '09 #2
truptivk
14 New Member
Neither. Just js, html and php.
Sep 22 '09 #3
ssnaik84
149 New Member
bind dataview to your CB3..
use DataView.RowFil ter to filter it each time, when user change value of CB2..
and bind it to CB3 again..
Sep 22 '09 #4
ssnaik84
149 New Member
ohh.. sorry... i thought you are a .NET developer..
Sep 22 '09 #5
ssnaik84
149 New Member
use AJAX in such cases.. it will make your life simple.. :)
there are several good articles here like this
Sep 22 '09 #6
truptivk
14 New Member
I see... is there anyway to do it with js and html? I don't know Ajax and I'm guessing it'll take me time to understand it and write code for my scenario.
Sep 23 '09 #7
Dormilich
8,658 Recognized Expert Moderator Expert
@truptivk
it would only be sensible, if the total content is not too much (because you have to supply all the data for the combo boxes along with the page load).
Sep 23 '09 #8
truptivk
14 New Member
<Dormilich>
it would only be sensible, if the total content is not too much (because you have to supply all the data for the combo boxes along with the page load).
</Dormilich>

Thank you. That is what I was thinking too, if I'm only going to use js and html AND want to be on same page.

In which case, it is about 4200 records. (Is that a lot?) If yes, then is Ajax my only hope? :(
Sep 23 '09 #9
Dormilich
8,658 Recognized Expert Moderator Expert
@truptivk
I would say so, you’d better use AJAX in this case.
Sep 23 '09 #10

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

Similar topics

3
5726
by: Midiman69 | last post by:
Can any one help with a problem I have with a tab control form I have a form with a two page tab control - page 1 being the main form. I have a data sheet view subform on page 2.(linked by "Partype" There is a part type combobox (from tblpartype) on page 1 and I wish to hide columns on the data sheet depending on what part type is displayed on page 1. I have tried this on the Partype after update event If Me!partype = "Resistor 0.25W...
0
1827
by: Nathan Carroll | last post by:
Attempting to eliminate flicker showing (form) and hiding seems to have no effect as I have it below. if I move the lines: Me.Show() Me.ShowInTaskbar = True f.Close() to the end of the load procedure the flicker goes away and produces effects that destroy my multiple binding scheme. This Line: Me.CurrentDate.Text = CStr(Now) is has a problem with
7
9613
by: TimC | last post by:
Hello all, A question from someone who dabbles in Access. Is it possible to hide or ghost out a combo box (or set of them) on a Form, and only have them appear as a usable option if a tick box option that is also on the form is ticked or marked as true ??.... I am asking this as I want to prevent people entering the data into these combo boxes unless they have selected this tick box. I have a few queries that primarily look at the Yes/No...
1
4721
by: Gian Paolo | last post by:
hi all i'm looking for a way to add 2 items in a combobox in the same line and hide one. i'm working on the code above but it returns me only the last value i entered and i do not know why.... *********** CLASS using System; using System.Collections.Generic;
0
4167
by: Gian Paolo | last post by:
this is something really i can't find a reason. I have a form with a tabcontrol with tree pages, in the second page there is a Data GRid View. Plus i have a class. When i open the form i "inizialize" the Data Grid View (add a data sorce, filled with notthing at staratup, and hide some columns) when i put a code in the txtCLCOD textbox start a searsh. If i foud something i popolate the Data grid view on the second page. Now the magic if i...
1
4176
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. I don`t want to change the way i have used to show and hide layers. check down code :- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
0
3456
by: Reinhard | last post by:
Hi, Need some directions on Ajax, UpdatePanel and Gridview to achive the following: I like to show a Gridview with Data ONLY if the user is interested in Details, but without a full page reload! If the page loads, only a summary (eg. COUNT of recs) should be displayed
3
5523
by: WiscCard | last post by:
This seems simple enough, but I am having problems. I have a table of customer information. I have a form with various combo boxes displaying unique customer information (in this case, zone and broker, but I'll add others before it is done. I want each user to choose what they want out of the combo boxes, then hit the command button, which will display the results on a customized form. If they choose both combo boxes, it works gerat. The...
3
24579
by: steveninfl | last post by:
Hello , I am using MS Access 2000. I have a Table called Transactions, I have created a form for this table, one of the fields on the form is a combo box with the row source type as value list. In this combo box field that I call "Transaction type" the user must select a value from the drop down list. What I want to do is based on the selection of the "Transaction type" field, if the user should select a transaction type of ADHOC or...
0
9706
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
9579
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
10577
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...
1
10320
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9150
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
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
6853
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();...
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.