Hi all,
I've posted this issue a few times now, and received no response aside from a 
comment on a typo I had already caught. Is there anything else I need to 
provide so that someone might take an interest in this issue? I would post a 
web site where I have the scripts, but where I work I don't have access to an 
external public web site. Thanks in advance for anyone who can help. I have 
also included the web browser output from FF 3.5.2, and IE7 at the bottom of 
the email.


Doug

(snip)

All,

I'm new to jQuery, but not JavaScript. I have the following really simple html 
file with jQuery-based JavaScript to open, read and display part of an xml 
file. It works fine on FF 3.5.2, but does not work on IE7. Am I missing 
something really simple to make jQuery work on IE7? Any help would be great, 
thanks!

 Doug Knight

 Here's the html/JavaScript:



<html>
                <head>
                                <title>Read XML</title>
                                <script src="lib/jquery.js" 
type="text/javascript" charset="utf-8"></script>
                                <script type="text/javascript" charset="utf-8">
                                jQuery(function(){
                                //$(document).ready(function(){
                                                
jQuery.get("test.xml",{},function(xml){
                                                
//$.get("test.xml",{},function(xml){
                                                                DBArea = '';
                                                                // This 
displays the values from the XML file
                                                                DBArea += "xml 
= :" + xml + ":\n";
                                                                // I get blanks 
here
                                                                DBArea += 
"$(xml).text() = :" + $(xml).text() + ":\n";
                                                                // The 
following gives [Object Object]
                                                                ph_sites = 
$(xml).find('product_header_sites');
                                                                DBArea += 
"ph_sites = :" + ph_sites + ":\n";
                                                                // And the 
following gives blanks too
                                                                ph_sites = 
$(xml).find('product_header_sites').text();
                                                                DBArea += 
"ph_sites = :" + ph_sites + ":\n";

                                                                // Update the 
DIV called Content Area with the HTML string
                                                                
$("#DebugArea").append("<pre>" + DBArea + "</pre>");
                                                });
                                });
                                </script>
                </head>
                <body>
                <div id="DebugArea"></div>
                </body>
</html>

 And here's the XML file:

    <text_msg>
        <product_header>
            <product_header_site_id>255</product_header_site_id>
            <product_header_node>191</product_header_node>
            <product_header_byte_count>332</product_header_byte_count>
            <product_header_product_type>2</product_header_product_type>
            <product_header_product_status>0</product_header_product_status>
            <product_header_sites>F90</product_header_sites>
        </product_header>
    </text_msg>

FF3.5.2 output:

xml = :

            255
            191
            332
            2
            0
            F90


:
$(xml).text() = :

            255
            191
            332
            2
            0
            F90

    :
ph_sites = :[object Object]:
ph_sites = :F90:

IE& Output:

xml = :



            255

            191

            332

            2

            0

            F90





:

$(xml).text() = ::

ph_sites = :[object Object]:

ph_sites = ::


Reply via email to