473,394 Members | 2,052 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,394 software developers and data experts.

Automatically Reload after Drop Down box

Hello,
I have a drop down list which is dynatically loaded from a database and
I have a second drop down list that is also dynatically loaded
depending on what is selected in the first drop down box. This all
works fine ... what isn't working is when I selected a different item
in the first drop down list I want it to automatically reload the items
in the second drop down list.

I have a funcation called loadNames that laod the second drop down
list. and I tried doing it so that function is called :

<asp:dropdownlist id="Departments" runat="server"
DataTextField="Department" DataValueField="Department"
AutoPostBack="True" OnSelectedIndexChanged="loadNames"
</asp:dropdownlist>


but it doesn't work... it will only reload the second drop down box
when I click a button.

Pam

Nov 19 '05 #1
1 2475
Pam,

OnSelectedIndexChanged from the drop down's code in the display page is
attempting to call a javascript called loadNames.

Instead go to the code behind and call loadNames from the first drop down
list's post back event handler.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
<pm******@uwaterloo.ca> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hello,
I have a drop down list which is dynatically loaded from a database and
I have a second drop down list that is also dynatically loaded
depending on what is selected in the first drop down box. This all
works fine ... what isn't working is when I selected a different item
in the first drop down list I want it to automatically reload the items
in the second drop down list.

I have a funcation called loadNames that laod the second drop down
list. and I tried doing it so that function is called :

<asp:dropdownlist id="Departments" runat="server"
DataTextField="Department" DataValueField="Department"
AutoPostBack="True" OnSelectedIndexChanged="loadNames"
</asp:dropdownlist>


but it doesn't work... it will only reload the second drop down box
when I click a button.

Pam

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Greg Scharlemann | last post by:
I would like to automatically populate a drop down menu when the page loads based on the selection of an item in a different drop down menu. I made a test page that when drop down #1 changes, drop...
2
by: Phil Longworth | last post by:
Im very new to Access 97 and Im sure I should be able to do this but cant work out how. Im bulding a database for my stamp collection. I have two tables; one with details of all the individual...
0
by: Stephen robinson | last post by:
I wonder if anyone has come across this issue. I have a template ASPX page apon which I drop user controls which in effect are my web pages. This works fine and all the controls loop around and...
3
by: dshan | last post by:
Hi all, I can't find an answer to my quesiton anywhere. Given a drop-down list with USA states and other text fields I pass this information for further processing via PHP. If any of the...
3
by: dshan | last post by:
Hi all, I can't find an answer to my quesiton anywhere. Given a drop-down list with USA states and other text fields I pass this information for further processing via PHP. If any of the...
1
by: Steve JORDI | last post by:
Hi, I'd like to know whether there is a class or some code sample available somewhere to do what I'd like to achieve. I have two drop down menus next to each other. The first one has its...
2
by: ckmenon | last post by:
I have a page in which there is a drop down list.the values in drop down list are the pages.now in one page i am adding a flag which is in an external window.As soon as I save my flag and the...
1
by: empiresolutions | last post by:
Im using this script, http://www.captain.at/howto-ajax-form-post-get.php, to make an ajax request to php via a drop-down (DD) select. This works fine. Then using this script,...
1
by: student2008 | last post by:
Sorry about the title its a tricky one. I have a form which allows me to add a question and answers into a mysql database via a combination of, if a certain option is chosen and the reset button...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.