Click to See Complete Forum and Search --> : help with xmlhttprequest
pentace
09-28-2007, 01:29 AM
I'm new to the whole xml world. I'm looking to find out if its possible and how to do so if. I'm using an xmlhttprequest on a web page to access an xml file. What I'm looking for is to have a user input a number sequence of 8 digits. Now I can pull in the responseText to a div and search the contents of the div by TD's for a match but its a lot of unwanted llag time. Is there a way to search the contents and only pull the match instead of the entire page contents? I've tried an eval but it does not seem to work for TD's. I've tried responceXML but only get either object or null. Unfort there is no way to name or I'd the elements. But its something I need currently I've been hand coding them into js. But I want to get away from having to recode everytime there is an update. Any ideas or suggestions?
jkmyoung
09-28-2007, 03:13 PM
If you want to do that, I'd suggest passing in a parameter into your request. You'd have to alter the Request handler to take in this parameter and filter the output results accordingly.
Do you have access to the back end of the web-page?
pentace
09-28-2007, 03:16 PM
I wish. I'm compiling all our web tools into one unfort I don't have access to the back end. Is there a way to do it without backend access?
jkmyoung
10-01-2007, 10:55 AM
If you don't have any way to filter what you're getting, you're going to end up pulling the entire page everytime in the responseText.
How exactly are you filtering the results now? Are you just getting tables of data back?
pentace
10-01-2007, 01:13 PM
Well the way the xml sheet is set up is its one table with about 400 table rows <tr> inside each <tr> are 4 sets of <td> the first td in each tr has a 6 digit numerical entry. What I want to do is when the user types one of those sets of numbers it use a request to go grab the contents of that tr. Now I can pull the entire table then filter it but that's a lot of data. I'm trying to filter it before pulling. I've tried using an eval but it does not seem to work on tables, tr's or td's.