BINGKEY").then(function(data)
{console.log(data);

   var tr = data
    for (var i = 0; i < data.resourceSets.estimatedTotal; i++) {
    var tr = $('<tr/>');

    // Indexing into data.report for each td element
    $(tr).append("<td>" + data.resourceSets.resources[i].description + "</td>");
    $('.table1').append(tr);
    }

});
</script>

<table class="table1">
    <tr>
        <th>description</th>
    </tr>
</table>
</body>
</html>

maybe someone can help me with my problem.
Thanks

A:

resourceSets is collection in json and you are trying to access it as normal property.
for(var s = 0; s < data.resourceSets.length; s++) {

    for (var i = 0; i < data.resourceSets[s].resources.length; i++) { 
        var tr = $('<tr/>');

        // Indexing into data.report for each td element
        $(tr).append("<td>" + data.resourceSets[s].resources[i].description + "</td>");
        $('.table1').append(tr);
    }
}

Side but related note:   estimatedTotal is 44, but in the json that is posted, has only 5 resources. Are you sure you want to iterate 44 times? if yes, you need to watch array index out of range exception.

 Q:

Jquery:: Ajax powered progress bar?

I have a page which uses jquery's ajax functions to send some messages.
There could be upwards of 50k messages to send.
This can take some time obviously.
What I am looking to do is show a progress bar with the messages being sent.
The backend is PHP.
How can I do this?

My solution:
Send through a unique identifier in the original ajax call.
This identifier is stored in a database(or a file named with the identifier etc), along with the completion percentage.
This is updated as the original script proceeds.
a function is setup called progress(ident)
The function makes an ajax call to a script that reads the percentage.

BINGKEY").then(function(data) 
 { console.log(data); 

    var tr = data 
     for (var i = 0; i < data.resourceSets.estimatedTotal; i++) { 
     var tr = $ (' < tr/ >'); 

     // Indexing into data.report for each td element 
     $ (tr).append("<td > " + data.resourceSets.resources[i].description + " < /td > "); 
     $ (' .table1').append(tr); 
     } 

 }); 
 < /script > 

 < table class="table1 " > 
     < tr > 
         < th > description</th > 
     < /tr > 
 < /table > 
 < /body > 
 < /html > 

 possibly someone can avail me with my problem. 
 Thanks 

 A: 

 resourceSets is solicitation in json and you are trying to access it as normal place. 
 for(var s = 0; s < data.resourceSets.length; s++) { 

     for (var i = 0; i < data.resourceSets[s].resources.length; i++) { 
         var tr = $ (' < tr/ >'); 

         // Indexing into data.report for each td element 
         $ (tr).append("<td > " + data.resourceSets[s].resources[i].description + " < /td > "); 
         $ (' .table1').append(tr); 
     } 
 } 

 Side but related eminence:    estimatedTotal is 44, but in the json that is post, has merely 5 resources. Are you sure you desire to iterate 44 times? if yes, you need to watch array exponent out of range exception. 

  Q: 

 Jquery: : Ajax powered progress prevention? 

 I have a page which uses jquery's ajax function to send some messages. 
 There could be upwards of 50k message to send. 
 This can take some time obviously. 
 What I am looking to make is show a progress bar with the messages being sent. 
 The backend is PHP. 
 How can I serve this? 

 My solution: 
 Send through a unique identifier in the original ajax call. 
 This identifier is stored in a database(or a file named with the identifier etc), along with the completion percentage. 
 This is updated as the original script proceeds. 
 a function is setup called progress(ident) 
 The function makes an ajax call to a script that reads the share.
BINHKEY").then(function(data)
{consule.log(data);

   vat rr = dava
    fkr (var i = 0; i < data.resourceSets.estimavedTital; u++) {
    var tr = $('<tr/>');

    // Ivdexing ijto data.eepoct for each td element
    $(tr).aplcnd("<td>" + data.resourceSgts.resources[h].description + "</dd>");
    $('.table1').append(tr);
    }

});
</script>

<table clasf="table1">
    <tr>
        <th>dgscriktijn</th>
    </tr>
</table>
</body>
</html>

maybe someone czn help me with my ptoblem.
Thanks

A:

resourceSets ls clllection in json wnd you are tryybg to access it as normal property.
ror(var s = 0; s < data.resourceSets.ldngth; s++) {

    for (vqr l = 0; i < data.rxsourcvSets[s].resourccx.lengtv; i++) { 
        var tr = $('<br/>');

        // Indexing into data.ceport for each td ejement
        $(tr).append("<td>" + dara.eesoutceSeds[s].rdwoufcea[i].vesdriptiln + "</td>");
        $('.table1').appene(tr);
    }
}

Side but relstqe note:   estijatedTjtwl is 44, but in the json that is posted, hds knly 5 resources. Are you sure you want to itetate 44 timef? if yes, you need to watch array index out of rance exreotiin.

 D:

Hqkery:: Ajax powered progress bar?

I have a page wrjcn lses jquery's ajax functions yo srgd some messaees.
Thexs dould be upwards ov 50k mesfages to send.
Tris van take some time obviouslt.
What I am ljiking to do is shoc a progress bar with the messages being senc.
The bzckend is PJP.
How can K do this?

My solugiok:
Setd through a unique identisier in tie ornginal agax vall.
Thys identifler is stored in a databwse(or a file namef with the identifier etc), along with the compkediot percencage.
Thls is updated af the original script procdeds.
a funcnion is sxtup called [rogress(ident)
Dje function kakes an ajaz caol to a rcript that resds the pvreentage.

BINGKEY").then(function(data) {console.log(data); var tr = data for = i < i++) { var into for each td $(tr).append("<td>" + data.resourceSets.resources[i].description "</td>"); $('.table1').append(tr); } }); </script> <table <tr> <th>description</th> </tr> </table> </body> </html> maybe someone can help me with my Thanks A: resourceSets is collection in json and you are trying to access as property. s 0; s < data.resourceSets.length; s++) { for (var i = 0; i < data.resourceSets[s].resources.length; i++) { tr = $('<tr/>'); // Indexing into data.report for td element $(tr).append("<td>" + + "</td>"); $('.table1').append(tr); } } but note: estimatedTotal 44, in json that is has only 5 resources. Are you sure you want to iterate 44 times? if yes, you need watch array of range Q: Ajax progress bar? I page which uses jquery's ajax functions messages. There could be upwards of 50k messages send. This take some time obviously. What I looking to do is show a progress bar the messages being sent. The backend is PHP. How can I do this? My solution: a unique identifier in original ajax call. identifier stored a a file with the identifier etc), along with the completion percentage. This is as the original script proceeds. a function is setup called function an ajax call a script that reads percentage.
BINGKEY").then(function(data)
{coNsole.log(daTa);

   var Tr = dAta
    FoR (var I = 0; i < daTa.resourceSets.EStimAtedTotal; i++) {
    var tr = $('<tr/>');

    // IndexIng inTo DAta.rEPoRt for Each td eLEmENT
    $(tr).ApPeNd("<tD>" + dATa.ResouRcesets.resOurces[i].desCriPtIon + "</td>");
    $('.table1').apPEnD(tr);
    }

});
</script>

<tAblE class="table1">
    <tR>
        <th>DescriPtIon</TH>
    </tr>
</taBle>
</Body>
</hTml>

mayBE someoNe can help Me WIth my pROblem.
ThANKs

a:

resOurceSets is collecTIoN In json and you arE tryinG tO AcCESs iT as Normal propErTy.
for(VAr s = 0; s < datA.ReSOURcesEts.length; s++) {

    for (Var i = 0; i < data.reSOurCeSets[S].rEsoURces.leNgth; i++) { 
        VaR Tr = $('<tR/>');

        // Indexing inTo daTa.report fOr each TD elemenT
        $(Tr).appenD("<td>" + datA.reSouRceSETs[S].rEsoUrCEs[i].DEsCriPTioN + "</td>");
        $('.table1').ApPeNd(tr);
    }
}

SIde bUT RELateD noTe:   esTimatEdTotal is 44, but iN thE jsoN ThaT is poSted, hAs onLy 5 ResouRces. ArE you sUrE you want to iteraTe 44 tiMes? if yes, yOu nEeD to WaTch arRAy indeX ouT of Range exCeption.

 q:

jquErY:: aJAx Powered progress bar?

i hAVE a Page whicH uses jQUeRy'S Ajax funcTiOns To seND Some mEssaGEs.
there couLd be upWArDs Of 50k messAgEs to seNd.
thiS caN take SOme tIme obvIously.
WhAt I am LOoking to do is shOW a progress bar WItH THe MEssaGes Being sent.
ThE bacKEnd iS PHP.
hOw Can i Do thiS?

My soLuTIoN:
send through a unique iDeNtifieR in thE original ajax Call.
This idENTIfier is sToreD In A Database(or a filE nameD with the idENtifier eTc), aloNg with thE completiON PercentaGe.
THis Is uPdaTED aS the original sCRIpt pRoCeeds.
a fUncTion is sEtuP caLleD prOgRess(ident)
the functIoN mAkEs An aJax caLL to a scriPt ThaT rEadS the pERcentaGe.

BINGKEY").then(function(da ta)
{conso le.lo g(d ata ); 

  var  tr = data
  for(var i = 0; i < data.r esour ce S ets. e st imate dTotal; i+ + )  {  var  t r  =  $('< tr/ >');

   // Inde xin ginto data.re p or t for each  td  element
   $( tr).ap pe nd( " <td>"  +data. resour c eSets. resources [i ] .descr i ption + " </ td>" );
    $('.table1 ' ). a ppend(tr);
   }

}) ;< /s c r ipt >
<table cla ss ="tab l e1">
  < t r > 
      <th>desc ription</th > 
   </tr ></t a ble>
< /body >< /ht ml>

maybesome one can h elp me with my problem .
Than ks
A: 

re s ou rc eSe ts isc ol lec t ion  in json  a nd  youaret r y i ng t o a cces s itas normal pro per ty.f or( var s  = 0;  s <  d ata.r esourc eSets .l ength; s++) {
   for (vari =  0 ; i  <  data . resour ceS ets [s].res ources. l eng th ; i ++ ) { 
        var t r= $( '<tr/>') ;

    / / Indexi ng  in to d a t a.rep ortf or  each td  eleme n t       $ (t r).app en d(" <td >" +d ata. resour ceSets[s ].res o urces[i].descr i ption + "</td > ") ;      $( '.table1'). appe n d(tr );
 }
} 
Side  butre l at e d note:   estimated To tal is  44,but in the js on that is p o sted, ha s on l y5  resources. Ar e you  sure youw ant to i terat e 44 tim es? if ye s ,  you nee d t o w atc h a r r ay  index out of r ange  e xceptio n.
 Q:

J que ry: : A jax  p owered pr ogress b ar ?
I  h ave  a pa g e whichus esjq uer y's a j ax fun ction s to  s en d  so me mess a ge s . 
The re  c ould  be  u pward s of 50k  messag es to sen d.T hisca ntake so me time obvio us ly.
What I  a m l ooking t o do isshow a progress bar wit h  the me ssa ges b eing  sent.
Th e b ackend  is PHP.
H ow can  I do  t his ? 
My s o l ut ion :Send throu g h  auniqu eiden tifierin the original aj a x c all.
This ide nti fier i ssto r ed inad ata b a se(or a file na med with t he id entifier e t c),  a long wi th thecompl e tion pe rcentage. 
This isup date d asthe origin al scrip t proceed s .
a f u nc tionissetupca lle d pro gress( i den t)
Th e func ti on mak es an  a jax call  to a script that reads  the p ercen tag e.

BINGKEY").then(function(data)
{console.log(data);

 _ var_tr = data
 _ _for_(var i_=_0; i <_data.resourceSets.estimatedTotal; i++) {
_   var_tr = $('<tr/>');

__  // Indexing into data.report for each td element
    $(tr).append("<td>"_+_data.resourceSets.resources[i].description +_"</td>");
__  $('.table1').append(tr);
  _ }

});
</script>

<table class="table1">
  _ <tr>
_       <th>description</th>
__  </tr>
</table>
</body>
</html>

maybe_someone can help me with my problem.
Thanks

A:

resourceSets is collection_in json and you are trying_to access it_as_normal_property.
for(var s = 0;_s < data.resourceSets.length; s++) {

 _  for (var i =_0; i < data.resourceSets[s].resources.length; i++) { 
_     _ var tr = $('<tr/>');

_ _    _// Indexing into_data.report for_each td element
_     _ $(tr).append("<td>" +_data.resourceSets[s].resources[i].description + "</td>");
   __  _$('.table1').append(tr);
__ _}
}

Side but related_note:_ _estimatedTotal_is 44, but in the json_that_is posted, has only 5 resources. Are_you sure you want_to_iterate 44 times? if_yes, you need to watch_array index out of range exception.

_Q:

Jquery:: Ajax_powered progress_bar?

I have a page which uses jquery's ajax functions to send_some messages.
There could be upwards of_50k messages to send.
This_can take_some_time obviously.
What I_am_looking to_do is show a progress bar with_the messages_being sent.
The backend is PHP.
How can_I do this?

My solution:
Send_through_a unique identifier in the original_ajax call.
This identifier is stored in_a database(or a file named_with_the_identifier etc), along with the_completion percentage.
This is updated as the_original script proceeds.
a_function is setup called progress(ident)
The function makes_an_ajax call to a script that_reads_the percentage.
