Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 23rd, 2006, 07:16 AM
Registered User
Join Date: Aug 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default xmlhttprequest - mozilla

I've a very frustrating problem trying to fix my code to work in Mozilla. I'd really appreciate help on this as I've not been able to find many samples of posting this to asp page! Here's my problem:-
I've various listboxes on an asp page with each populating the next from a database. Rather than submitting the form each time, the listbox onchange event runs some client side code to grab the form info, load it into as xml, post it to another asp page which then queries the database. The results are returned back as a string and popped back into the relevant listbox. This all works fine in IE but falls down in Mozilla. The error returned is "no element found". Here's my code to post it to the asp page using Mozilla (the IE code is separate):-

              strXML = "<criteria>";
              strXML = strXML + "<listbox1>" + document.myform.term1.value + "</listbox1>";
              strXML = strXML + "<listbox2>" + document.myform.select1.value + "</listbox2>";
              strXML = strXML + "<listbox3>" + document.myform.term2.value + "</listbox3>";
              strXML = strXML + "</criteria>";
              xmlDoc=document.implementation.createDocument(""," ",null);

                  //create a DOMParser
                  var objDOMParser = new DOMParser();

                 var objDoc = objDOMParser.parseFromString(strXML, "text/xml");

              while (xmlDoc.hasChildNodes())
                //add the nodes from the new document
               for (var i=0; i < xmlDoc.childNodes.length; i++)
                  //import the node
                  var objImportedNode = xmlDoc.importNode(xmlDoc.childNodes[i], true);

                  //append the child to the current document




              strResponse = xmlhttp.ResponseText;

so, it doesn't in fact error but just returns a no elements found.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XMLHttpRequest.open smys123 Javascript 4 August 21st, 2007 02:18 AM
XMLHttpRequest object instantiation AGS BOOK: Beginning Ajax with ASP.NET 4 September 25th, 2006 03:52 AM
using XmlHttpRequest from .pac file sergeyk BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 September 5th, 2006 12:19 PM
XMLHttpRequest asyncronous by default? AGS BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 June 17th, 2006 04:44 PM
Multiple Concurrent Requests to XmlHttpRequest deepak.vasudevan Ajax 3 March 22nd, 2006 04:56 AM

All times are GMT -4. The time now is 04:22 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.