Click to See Complete Forum and Search --> : Searching The XML


LtOBrien
06-12-2008, 09:58 PM
Hello,
I'm a bit new to XML, and HTML in general, and I need a bit of help with a particular project I'm helping a friend with.

We have a very large XML database that we want to search through using more than just the simple "textbox and search button" method that I've learned. I've set up some code that uses a form containing 1 set of radio buttons, and 3 select menus. Unfortunately the Javascript I'm using to make the search function, simply doesn't recognize the form's objects.

My error message comes up as "Line:52 Error: 'Enhancement' is undefined."
I've checked my spelling, my capitalization, basically everything. Yet it won't recognize the Radio button's ID.

Can anyone give me some advice on the matter?

Franzus
06-16-2008, 09:31 AM
Perhaps this will help you:

http://www.flashkit.com/tutorials/Dynamic_Content/XML-Base-Joachim_-831/index.php

Kor
06-17-2008, 10:10 AM
Perhaps this will help you:

http://www.flashkit.com/tutorials/Dynamic_Content/XML-Base-Joachim_-831/index.php
That is not quite LtOBrien seems to need. The link you have posted treats the integrating of XML into Flash.

LtOBrien, first you need to include the XML into the XHTML document or to perform a request via AJAX:
http://www.w3schools.com/Ajax/Default.Asp

Now you may use XML DOM to circle through the XML elements:
http://www.w3schools.com/dom/default.asp

LtOBrien
07-11-2008, 05:42 PM
Thanks for the reply guys, sorry I didn't answer very soon, Ive been away from HTML for a while to work on some CG stuff. Im going to look into the AJAX and DOM stuff now, and then Ill get back to you on how well it worked.

LtOBrien
07-11-2008, 07:03 PM
Ok. From what I've read, this is exactly what I'm looking for. The only issue is, that these tutorials only work for a one variable search.

My page uses (as I said before) multiple form objects, and when I try to use the normal JavaScript search method, it simply doesn't work. Does anyone know of a way to implement the AJAX search method with multiple search variables?

Currently my only idea is to set it up to where when the "search" button is clicked, the JavaScript sets all of the variables to a single txt variable using multiple "If-else" statements.

LtOBrien
07-11-2008, 08:04 PM
AGH, alrighty then, I am all out of Ideas... SO

I am requesting that someone find a way to search this (http://myfreefilehosting.com/f/a6aaebf5b0_0.19MB) using "Type" "Enhancement" and "Level" as search criteria. I don't even need to you reply with fully coded instructions, the method will be good enough, but feel free to post code if you don't mind me using it in a Profit-free organization.

Of course the XML document above is not completed; the levels range from: 0-50;

the Enhancements are: Enhanced, Armored, and Shielded;

and the Types are: Footwear, outerwear, eyewear, shirt, pants, and headwear.

Again full code is not needed, just a method, idea or advice is what Im asking for.