ajax ポスト リクエストで多次元オブジェクトを送信していますが、オブジェクトの最後の部分が失われることがありますか? 送信できるデータ量に何らかの制限はありますか?
--------
アップデート
data.accounts
ajaxポストの前に子を数えるときの数は221でありdata.accounts
、成功ハンドラで数を数えるときはまだ221です
送信されるデータは最大 10kb です
オブジェクトがajaxで送信される直前にこれを行うと、すべてのデータが表されます
var arr = [];
for(var key in obj){
arr[arr.length] = key+' = '+obj[key];
}
alert(arr.join('\n'));
しかし、バックエンドでこれを行うと、データの最後の部分が失われます
print_r($data);
データ構造 (200 を超える子が存在しますが、受信されるのdata.accounts
は 198 のみです)
Array
(
[account_id_] => 0
[name] => 1
[type] => 2
[type_pl] => Drift
[type_b] => Status
[type_p] =>
[type_h] => Tekst
[type_t] => Sum
[att_sumfrom] => 4
[vatcode] => 3
[accounts] => Array
(
[0] => Array
(
[account_id_] => 1
[name] => OMS�TNING
[type] => 3
[att_sumfrom] =>
[vatcode] =>
)
[1] => Array
(
[account_id_] => 1000
[name] => Varesalg
[type] => 0
[att_sumfrom] =>
[vatcode] => S25
)
[2] => Array
(
[account_id_] => 1200
[name] => Udf�rt arbejde
[type] => 0
[att_sumfrom] =>
[vatcode] => S25
)
.......
データの送信
this.send = function(){
var jqxhr = $.ajax({
url : this.url,
data : this.data,
timeout : this.no_timeout ? 0:this.timeout,
cache : this.cache,
dataType : this.dataType,
type : this.type,
global : this.global
})