どのように
<script>
// as of jQuery 1.5.x ++
var pagePreview = $("#page_preview");
$.get("ajaxloader/").success(
function(response, status, jqXhr) {
alert("Success!");
pagePreview.empty();
pagePreview.append(response);
// i feel you need to parse the response for the google map div, and perform another $.get() of the google url?
}).error(function(response, status, jqXhr) {
alert("These are not the droids you are looking for. move along.");
}).complete(function(response, status, jqXhr) {
alert("Complete!");
});
</script>
#どうして
jQuery.load()でドキュメントが表示されます。.load はこれと同等です
$.get(url, data, success ) とほぼ同じですが、グローバル関数ではなくメソッドであり、暗黙的なコールバック関数がある点が異なります。成功した応答が検出されると (つまり、textStatus が "success" または "notmodified" の場合)、.load() は一致した要素の HTML コンテンツを返されたデータに設定します。
登録して値$.ajax( complete:function(responseText, textStatus, XMLHttpRequest)){});
を確認する必要がありtextStatus
ます。OK の場合は、$('selector')
自分でデータを宛先にロードします。または.load()
、chrome (ctrl + shift + j) でネットワーク xmlHttpRequests を監視するか、firebug でいくつかのネットワーク タブを監視して修正し、「url」値で問題をデバッグします。$('selector').load( 'url', function(response, status, xhr){})