jQuery .get not working on new server

Im using jQuery .get to pull in and then parse an xml file. It was working fine on my test environment, but when moved to production server its not working. Is there anything wrong with my code that would cause this?

$(document).ready(function()
        {
          $.ajax({
            type: "GET",
            url: "RSS/NinjaTraderRSS.xml",
            dataType: "xml",
            success: parseXml
          });

          function parseXml(xml)
            {
              $(xml).find('item').each(function() {
                    var title = $(this).find('title').text();
                    var page  = $(this).find('link').text();
                    var desc  = $(this).find('description').text();
                    $('#ticker').append($('<li>', '<a href={text: page}>', {text: title}, {text: desc}));
                    //$('#ticker').append($('<li><a href="' + page + '">' + title + '</a>' + '&nbsp;' + '-' + '&nbsp;' + desc + '</li>'));
                });
                $('ul#ticker').newsTicker();
            }
        });

When i view the net in firebug it is returning a 200 OK for the xml, but when i inspect the element its not appending to the ul.

Im using the jquery "newsTicker" plug in to make them cycle through. Is there a way to do this without the plug in? Im in a bad spot here...help is very much appreciated. thx

Answers


The problem lies with the following in your script:

$('#ticker').append($('<li>', '<a href={text: page}>', {text: title}, {text: desc}));
//$('#ticker').append($('<li><a href="' + page + '">' + title + '</a>' + '&nbsp;' + '-' + '&nbsp;' + desc + '</li>'));

Commenting out the first line instead of the second fixes the problem.


Are you sure the MIME type is set correctly (text/xml) on the document being returned?


Need Your Help

Most elegant way to make this javascript code DRY

javascript dry

Here is a snippet of my JavaScript Code that I want to DRY up:

perform classifier training on twitter data

java twitter nlp

I have just started learning about NLP and I have to do a course project this semester. what I want to do is :

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.