EDIT: Sorry for the repost, I was tabbing through the page and
accidentally sent before I was done composing.

Hi all,
I've spent a long time trying to figure out why my code to pull
elements out of an XML file isn't working, to no avail. Here's the
code snippet I'm using, given an XMLHttpRequest named responseXML
which seems to be in fine shape (inspected using Safari 4 beta's
"Inspect Element" feature):

function extractBifData(responseXML, vorticityClass,
vorticityStrength)
{
        var bifData = [];
        $(responseXML).find('wave').each(function () // WTF
        {
                var wave = $(this);
                var A = wave.attr('A');
                alert('entered the function'); // for simple debugging
                bifData.push([parseFloat(wave.attr('Q')), parseFloat(wave.attr
('amplitude'))]);
        });
                return bifData;
}

When this function gets called, it looks like the anonymous function
(with the "WTF" comment) isn't even getting called (ever) since I
never see an alert.
You can see the entire preliminary page over at 
http://math.brown.edu/~mjball/viewer/.
Steps to reproduce the error:
        1. There's only 1 dropdown when you first load the page. Select "exp"
from it.
        2. This should spawn another dropdown. If you select any item from
it, it spawns a Flot plot with no data in it (since the XML parsing
failed).
I know that I can plot data with Flot; you can see a small hardcoded
dataset I was testing with at line 135. The code snippet I pasted
above starts at line 16.

Thanks for the help in advance! Again, my apologies for the (partial)
repost.
Matt

Reply via email to