I'm using to parse the response coming from '.aspx' page. Response comes in
the form of 'text/xml', which is rendered very well in all browsers except
the IE.:,(

I did uploaded my code on the server but the problem exists.

Can any body tell me what can be the problem & how I can resolve it?

Following is the JS Code:
__________________________________________________________

function GetXMLResponse(url) {
    var $urlToSend = url + "&random=" + Math.floor(Math.random() * 100001);
    $(document).ready(function() {
        $.ajax({
            type: "GET",
            url: "search.aspx",
            data: $urlToSend,
            dataType: "text/xml",
            success: function(xml1) {
                var xml;
                try {
                    if (typeof xml1 == 'string') {
                        xml = new ActiveXObject('Microsoft.XMLDOM');
                        xml.async = false;
                        xml.loadXML(xml1);
                    }
                }
                catch (e) { xml = xml1; }

                $(xml).find('newdataset').each(function() {
                    if ($(this).find('datatable').length < 1) {
                        html = '<table cellspacing="0" style="table-layout:
auto; width:100%; height:200px;"><tr><td style="text-align:center;
vertical-align:top; padding-top:10px;">No Result Found</td></tr></table>';
                        $('#gridBody').append($(html));
                    }
                    else {
                        $(xml).find('columns').each(function() {
                            var html = '<table cellspacing="0"
style="table-layout: auto; width:100%; height:100%;"><tr>';
                            $(this).find('column').each(function(index) {
                                if (index == 0)
                                    html += '<td style="width:90px;">' +
$(this).attr('displayName') + '</td>';
                                else
                                    html += '<td>' +
$(this).attr('displayName') + '</td>';
                            });
                            html += '</tr></html>';
                            $('#gridHead').append($(html));
                        });

                        html = '<table cellspacing="0" style="table-layout:
auto; width:100%; height:100%;">';
                        $(this).find('datatable').each(function() {
                            html += '<tr><td style="width:80px;
text-align:center;"> images/' + $(this).find('display_image').text() + '
</td><td>' + $(this).find('display_text').text() + '</td></tr>';
                        });
                        html += '</table>';
                        $('#gridBody').append($(html)); ;
                    }
                });
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert(textStatus);
            }
        });
    });
}
__________________________________________________________

Following the portion of xml which comes as a response:
__________________________________________________________

<griddata>
<columns rowIdColumn="display_id">
<column name="display_image" displayName="Introduction" width="10%"
type="image" alt="Summary"></column> 
<column name="display_text" displayName="Display Text" width="90%"
type="text"></column>
</columns>
<newdataset>
  <datatable>
    <rowid>1</rowid>
    <display_image>myImage.jpg</display_image>
    <display_id>1223</display_id>
    <display_text>my New Text</display_text>
    <year>1998</year>
    <volume>asasf</volume>
    <pageno>123</pageno>
  </datatable>
  <recordsdatatable>
    <records_number>1</records_number>
  </recordsdatatable>
</newdataset>
</griddata>
__________________________________________________________
-- 
View this message in context: 
http://www.nabble.com/Code-Not-Working-on-IE-tp25065530s27240p25065530.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to