English 中文(简体)
JQuery、Ajax和因特网探索者——只有在反应空白时,才进行回响。
原标题:JQuery, Ajax and Internet Explorer - callback only works when response is blank
  • 时间:2010-01-13 05:55:32
  •  标签:
  • jquery

我的法典在FF、Safari和Khat......中完美地发挥作用,就像在IE 7和8中那样。

我的JQuery AJAX职位就是这样:

$.post(  page.php , { test:  testing  }, function(r){
    alert( Data:   + r);
});

现在,如果应急反应(r)回到空白处,就会显示警惕。 然而,如果在集会上有任何回馈(即使只是一位数位数),那就没有显示警示。 没有任何错误出现,只是没有显示背书。

任何可能是错误的想法?

最佳回答

“因特网探索者”座右铭,首先,你应清除你的浏览器的藏身,然后将你的代码编辑成如下。

$.ajax({
      url: "page.php",
      type: "POST",
      cache: false,
      data: ({ test:  testing  }),
      success: function(r){
          alert( Data:   + r);
      }
   }
);

使用<cache:虚假使浏览器不会达到结果

问题回答

如果是你,我将试图明确告诉你希望得到哪类数据。 如果你们期望的是简单案文,就这样说:

$.post(  page.php , { test:  testing  }, function(r){
    alert( Data:   + r);
},  text  );

如果您期望得到<代码>JSON的答复,则规定:

$.post(  page.php , { test:  testing  }, function(r){
    alert( Data:   + r);
},  json  );

http://api.jquery.com/jQuery.ajax/“rel=“nofollow noreferer”>,可接受类型见

您是否试图确定测试数据的关键? 我曾经看到过这种情况。

$.post(  page.php , {  test :  testing  }, function(r){
    alert( Data:   + r);
});




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签