473,387 Members | 1,583 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,387 software developers and data experts.

Filter XML in XSL using HTML Controls

7
All,

I wondered if it were possible to filter XML data based on selected options, values in combos in HTML.

Suppose I have the following simple XML:

<root>
<city name="London">
<person name="Jeff"/>
<person name="Jess"/>
</city>
<city name="Leeds">
<person name="Ang"/>
<person name="Pete"/>
</city>
</root>

Now I want to have a combo box containing the city names - London and Leeds. When the combo box value changes, I want the page to refresh to display the person names under the combo for the selected city name.

Is this possible? If so, are there any best practices or ways of doing this prefereably without using vbscript. Javascript perhaps


Andez
Feb 6 '08 #1
1 2143
jkmyoung
2,057 Expert 2GB
The methods I have seen have generally used javascript.
  1. Create a onchange method for your main combobox (city), which uses the value of the combobox as the parameter .
  2. Inside the function, look for the corresponding city node with this name.
  3. Get all the children of that node.
  4. Get the node in your html document of the 2nd combobox.
  5. Use the name attributes of the child nodes to populate the 2nd combobox.

Visual Basic method:
http://www.thescripts.com/forum/thread767817.html
Feb 6 '08 #2

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

Similar topics

3
by: Baz'noid | last post by:
Hi all, With the recent postal strikes here in the UK i'm trying to persuade access to email reports at the touch of a button. I've not been able to figure out how to filter the report - when i...
3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
8
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
4
by: Bo Diddly | last post by:
This is what I've done so far: I have a DataBase with: tblBook BookID... key Book... All the book titles of the Bible tblChapter ChapterID... key Chapter... chapter numbers (1 - 150)
4
by: hadardo | last post by:
Hello all. Let me start by saying that I don't use VBA so often, so I ask for your forgivness if my questions is somewhat silly. I'm trying to find if a user typed the same value in two or more...
2
by: Shivonne | last post by:
Hi all I am currently developing in VS .NET 2005. I am trying to create a master page but am getting the above error (Unrecognized tag prefix or device filter 'asp') when trying to add a Content...
1
by: Luurs | last post by:
Hi All, I've been using a asp-label in the HTML <headsection for quite some time in order to dynamically generate meta-keywords,-description, css and js references. Though the actual...
6
by: fonzie | last post by:
Is there any way to include two unbound text boxes (for a start date and end date) to a filter-by-form? The users may want to filter by several different fields and they may want to include a date...
5
by: Ron S | last post by:
After days of searching I finally an example that would work with my application, the only problem is after entering all of the code it is not working. Would someone be kind enough to take a look at...
5
aas4mis
by: aas4mis | last post by:
I haven't had much luck with specific controls, their properties and loops in the past. I thought I would share this tidbit of code, feel free to modify/modularize in any way to suit your needs. This...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.