pepoとネットワークを語ろう

40年前からこれまでとこれからのネットワークを語る

jquery $.ajax Uncaught TypeError: Cannot read property 'di0' of null

2012-03-03 11:09:09 | パソコンよもやまばなし

くじらのだんな何故かjqueryでajax中

$.ajaxでステータスがsuccessなのに

Uncaught TypeError: Cannot read property 'di0' of null Uncaught TypeError: Cannot read property 'di0' of null

でるねん

ちなみに

 if (di2json.di0 !=null)もあかんし

 if (di2json in 'di0')もあかんし

 if (di2json.hasOwnProperty('di0')もあかん

$.ajax({

       url: "tmp/.di_read_data.json",

       dataType: "json",

       type: "get",

       cache: false,

       async: true,

       success: function(di2json, status) {

         val = status;

         $("#disp_menu5").text("di2json status " + val );

         if (di2json.di0){

ここでUncaught TypeError: Cannot read property 'di0' of null

           val = di2json.di0;

このエラーを判定する方法ないん?

おそらく、tmp/.di_read_data.jsonへ書き込んでいる途中でajaxにゲットされるものと思う

やっぱりサーバー側で対応するしかないやろな

 

pepoと

 


最新の画像もっと見る

コメントを投稿

ブログ作成者から承認されるまでコメントは反映されません。