Gett загрузка JSONP через jQuery

ОБНОВЛЕНИЕ 1:

Это то, что я получаю в браузере, если набираю

http://www.remote_host.com/feed.php?callback=jsonpCallBack

{
    "rss": {
        "channels": [
            {
                "title": "title goes here",
                "link": "http://www.remote_server.com/feed.php",
                "description": "description goes here",
                "items": [
                    {
                        "title": "item title goes here",
                        "link": "item link goes here",
                        "pubDate": "item date goes here",
                        "description": "item description goes here"
                    },
                    {
                        "title": "item title goes here",
                        "link": "item link goes here",
                        "pubDate": "item date goes here",
                        "description": "item description goes here"
                    },
                    {
                        "title": "item title goes here",
                        "link": "item link goes here",
                        "pubDate": "item date goes here",
                        "description": "item description goes here"
                    }
                ]
            }
        ]
    }
}

Значит, это не jsonp?

ОРИГИНАЛЬНЫЙ ВОПРОС:

У меня есть следующий сценарий, в котором я пытаюсь получить данные json с удаленного хоста:

$(document).ready(function() {
    get_json_feed();

    function get_json_feed() {
        $.ajax({
            url: 'http://www.remote_host.com/feed.php?type=json',
            type: 'GET',
            dataType: 'jsonp',
            error: function(xhr, status, error) {
                alert("error");
            },
            success: function(json) {
                alert("success");
            }
        });
    }
});

Но по какой-то причине я получаю сообщение об ошибке и предупреждение:

Предупреждение: ресурс интерпретируется как Скрипт, но передан с типом MIME text / html.

Ошибка: Неперехваченная ошибка SyntaxError: Неожиданный токен:

Что я делаю не так?

6
задан diEcho 2 June 2011 в 11:52
поделиться