Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8718979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:40:40+00:00 2026-06-13T06:40:40+00:00

Age old problem probably but about to pull my hair out. I have an

  • 0

Age old problem probably but about to pull my hair out.

I have an xml file being loaded from the same folder as the html file.

JS Code:

function onxmlReceived(data) {

         if(!($.browser.msie)) {//for Non IE Browsers
         var xmlData = data;                                                            
         }else {// For IE                                   
           var xmlData = new ActiveXObject("Microsoft.XMLDOM");
           xmlData.async = false;
           xmlData.loadXML(data);                                  
         } 

         alert ("Got: "+xmlData);
         alert("Got: "+data);

    $(xmlData).find('energyDM').each(function(){
        d1=[];
        for(var i = 0; i < Rec_Count; i++) {
                something();
            }
    });

}

function graphUpdate(){ 
    $.ajax({ 
    url: "EnergyDM.xml",
    type:"GET",
    dataType: ($.browser.msie) ? "text" : "XML",
    success: onxmlReceived,
    error: function(xhr, textStatus, errorThrown)
        { 
            alert(textStatus + ' ' + errorThrown);
        }
    });
}

I have two alerts. In IE,

alert ("Got: "+xmlData); gives Got: in the alert window, where as
alert("Got: "+data); Gives Got: + the proper xml content in an alert window

And since the xml is not loaded, I cant access the nodes in the something() section

XML file

 <?xml version="1.0" encoding="ISO-8859-1" ?> 
- <response>
- <energyDM>
  <edNum>1000</edNum> 
  <TMF>UTC</TMF> 
  <pm339>0.166</pm339><pm340>1327449209</pm340> 
  <ed0000>0.148</ed0000> 
  <et0000>1327449510</et0000> 
  .
  .

alert("Got: "+data); correctly shows this XML content.

Am I missing something? I would appreciate any clues. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:40:42+00:00Added an answer on June 13, 2026 at 6:40 am

    I figured out something as to why it is not working. Inside the something() function, I had for(var i = 0; i < Rec_Count; i++) { if(i < 10) { d1.push([(parseInt($(this).find(‘et’ + (‘0000’ + i).substr(-4))*1000, parseFloat($(this).find(‘ed’+(‘0000’ + i).substr(-4)).text())]); } } I changed this to for(var i = 0; i < Rec_Count; i++) { if(i < 10) { d1.push([(parseInt($(this).find(‘et000’+i).text(),10))*1000, parseFloat($(this).find(‘ed000’+i).text())]); } } it works in IE.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the age-old problem of a div wrapping a two-column layout. My sidebar
This is an age old problem - but now I'm using scriptaculous its come
All, Im having the age old problem with character encoding... I have a mySQL
I can't seem to find a simple, straight-forward solution to the age-old problem of
Age old question! When you have finished developing and testing your ASP.Net web application,
I have a object var foo = { jon : {age: 'old', feeling: 'sad'
Okay, I might be asking an age old question, but I did not get
I have some age-restricted content needed to confirm 18 years old stuff. so I
From my age old php days (years ago) I slightly remember that I had
this is my age-old problem and I've never found a real solution for this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.