473,659 Members | 2,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

USING XML TO FILL LINKED DROPDOWN LIST

My Goal is to have a dropdown (DL2) filled from the selectIndexChan ge event
of a primary dropdown (DL1). These are picklists that will be selected
frequently.

Can someone recommend a strategy that will not require the screen to refresh
every time.

1) If I use HTML dropdown lists, how do I trigger a postback?
2) Can I load XML into the viewstate and use the viewstate data somehow?
3) Should I just bite the bullet and let the screen refresh? How can I make
it more efficient?

Thanks in advance.
Nov 11 '05 #1
3 9860
Jim Mitchell wrote:
My Goal is to have a dropdown (DL2) filled from the selectIndexChan ge event
of a primary dropdown (DL1). These are picklists that will be selected
frequently.

Can someone recommend a strategy that will not require the screen to refresh
every time.

Client side DHTML scripting with XML islands?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2
You can use either client-side code that reads an included XML file (see the
<xml> tag for more info) or a Web service to accomplish this without
refreshing the screen. For the first method, create an MSXML document and
use XPath to extract the cotents of the picklist based on the user's
selection in the main list. For the second, use the XMLHTTP control or
remote scripting to obtain the data from the server and populate the pick
list. If you have only IE clients, you can use the Web services toolkit to
simplify parsing the Web service return value; otherwise, you'll have to
parse the returned data yourself (not a big deal).

If the pick lists are small and there aren't too many of them, you can
pre-build all of them on the server and simply hide and show them on the
client based on the user's selection in the main list, again using
client-side code.

"Jim Mitchell" <ji**********@m indspring.com> wrote in message
news:ek******** ******@TK2MSFTN GP12.phx.gbl...
My Goal is to have a dropdown (DL2) filled from the selectIndexChan ge event of a primary dropdown (DL1). These are picklists that will be selected
frequently.

Can someone recommend a strategy that will not require the screen to refresh every time.

1) If I use HTML dropdown lists, how do I trigger a postback?
2) Can I load XML into the viewstate and use the viewstate data somehow?
3) Should I just bite the bullet and let the screen refresh? How can I make it more efficient?

Thanks in advance.

Nov 11 '05 #3
Thanks - It sounds like client side code makes the most sense. I guess in
some cases, there is no way to write an efficient app with all server
controls. This might be a good example.

CAN YOU TELL ME HOW TO INITIATE A POSTBACK FROM A CLIENT EVENT? I can
always call the whole page again, but is there a way to tell the server this
is a postback from javascript?

Thanks again.

Jim
"Russell Jones" <ar**@nospam.no rthstate.net> wrote in message
news:u8******** ******@TK2MSFTN GP09.phx.gbl...
You can use either client-side code that reads an included XML file (see the <xml> tag for more info) or a Web service to accomplish this without
refreshing the screen. For the first method, create an MSXML document and
use XPath to extract the cotents of the picklist based on the user's
selection in the main list. For the second, use the XMLHTTP control or
remote scripting to obtain the data from the server and populate the pick
list. If you have only IE clients, you can use the Web services toolkit to
simplify parsing the Web service return value; otherwise, you'll have to
parse the returned data yourself (not a big deal).

If the pick lists are small and there aren't too many of them, you can
pre-build all of them on the server and simply hide and show them on the
client based on the user's selection in the main list, again using
client-side code.

"Jim Mitchell" <ji**********@m indspring.com> wrote in message
news:ek******** ******@TK2MSFTN GP12.phx.gbl...
My Goal is to have a dropdown (DL2) filled from the selectIndexChan ge

event
of a primary dropdown (DL1). These are picklists that will be selected
frequently.

Can someone recommend a strategy that will not require the screen to

refresh
every time.

1) If I use HTML dropdown lists, how do I trigger a postback?
2) Can I load XML into the viewstate and use the viewstate data somehow?
3) Should I just bite the bullet and let the screen refresh? How can I

make
it more efficient?

Thanks in advance.


Nov 11 '05 #4

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

Similar topics

3
589
by: Jim Mitchell | last post by:
My Goal is to have a dropdown (DL2) filled from the selectIndexChange event of a primary dropdown (DL1). These are picklists that will be selected frequently. Can someone recommend a strategy that will not require the screen to refresh every time. 1) If I use HTML dropdown lists, how do I trigger a postback? 2) Can I load XML into the viewstate and use the viewstate data somehow? 3) Should I just bite the bullet and let the screen...
3
2118
by: Maurice Mertens | last post by:
Hi all, In VB.NET you can set the DropDownStyle for a combobox to 'DropDown' or 'DropDownList'. When you set it to DropDownList, it supports auto-fill. But when you set it to 'DropDown', the auto-fill support is gone. How can I get auto-fill on a combobox with a dropdownstyle 'DropDown'? --
1
2101
by: Kaneda | last post by:
Hello everyone! I have some weird(?) problems, and I am not quite sure if there are due to my errors or maybe a limitation in the .Net framework. I have a ComboBox I need to fill with the content of an untyped DataSet. This is to be done in the "DropDown" Event (since the dataset is empty at program start). If I go with this:
2
369
by: K R Lal | last post by:
Hi, Any idea how to fill a dropdownlist thru dataset I done like this ddLst1.DataSource = myDataSet ddLst1.DataMember = myDataSet.Tables(0).Columns(1).Caption ddLst1.DataValueField = myDataSet.Tables(0).Columns(0).Caption
5
6522
by: SirPoonga | last post by:
I think I'd have to do a combination of ASP and javascript to do this. What I want to do fill the first drop down box with values from a database query. Then based off that selection fill in the values of another drop down. Let's use the car industry as an example. Lets say I am storing in a database the data and relationships between car make, car type, and car model. So the first drop down box would like all makes. Upon selecting...
1
5275
by: mikeybe | last post by:
Making a very simple library circulation database for a school project. I have a Patron Information table(patronID, first name, last name, phone) , an item information table (bookID, book title, authorfirst, author last) and a circulation file (ID, bookID, patronID, checoutdate, checkindate). Circulation file is linked to others in a one to many fashion so that I can have the same book checked out time after time.
0
1168
by: Nathan | last post by:
Hello all, Thanks for all your help in the past. To start off, I'm much more familiar with the web aspect of this stuff. So a DropDownList in the middle of a DataSet or Repeater is no big deal. But on the Windows Forms side of things I am curious if anyone can provide a quick basic example of how this might work. I've searched all over Google Groups and can't seem to find any clear examples.
3
3067
by: LacOniC | last post by:
Hi. I'm new to C# especially to arrays. I need a 3 dimension array to fill a dropdown list in a web page. TypeOfTest | MinPoint | Value I'll use Type of Test and Value in dropdown. MinPoint will be shown in a label near dropdown. Can u help me?
8
2043
by: tagg3rx | last post by:
Hi All, I have created a panel as a place holder on an input interface and I want to be able to dynamicaly fill it with drop down lists, check boxes etc. So below I'll show you the two main pieces of this effort - the function that creates the dropdown list in question and the function that fires when the submit button is clicked. I've stepped through this and what I'm finding is that when the submit button is clicked the page posts back and...
1
3456
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second set of 3 dropdown boxes be filled with the same values. thank you <head> <SCRIPT LANGUAGE="JavaScript" type="text/javascript"> var firstChoice2 = 0; var secondChoice2 = 0;
0
8428
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
8851
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
8751
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8630
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...
0
7360
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...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2759
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
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
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.