 the Smarty manual though, just in case.
As an alternative, you could render the page without the large amount of data, and then load it in sections via AJAX. Whilst making, say, 10 AJAX connections serially adds a small extra overhead, it sounds like that will be minimal in comparison to your current rendering time. Even though your total rendering time may be slightly longer, the perceived rendering time for the user will be much faster, and of course they have the benefit that they can see data arriving.
I would kick off the first AJAX operation in jQuery upon domready, and when each completes, it can fire off another request. If your server can answer in JSON rather than HTML, it will allow the server to return a more_available Boolean flag, which you can use to determine if you need to do another fetch.

 Q:

when i use dataType json it shows elment ] is missing in my ajax script

trying to use datatype json to get the value in json format but when i add  it into my script it shows error that elemet ] is missing what am i doing wrong?
    $(document).ready(function(){
    $(window).scroll(function(){

        var lastID = $('.load-more').attr('lastID');

        if ($(window).scrollTop() == $(document).height() - $(window).height() && lastID!= 0){
            $.ajax({
                type:'POST',

                url:'<?php echo base_url("user/get_all_post");?>',
                data:"id="+lastID,
                dataType:'json',

                beforeSend:function(html){
                    $('.load-more').show();
                },
                success:function(html){

                 //alert(html);
                 var ParsedObject = JSON.stringify(html);            
              var json = $.parseJSON(ParsedObject);
              //alert(json);
            /*
              var json =" [{'id':1,'name':'Test1'},{'id':2,'name':'Test2'}]";
              var jsonArray = eval('(' + json + ')');
            for (i in jsonArray)
            {
             alert(jsonArray[i]["name"]);
            }
            */
             // alert(json.id);
              var jsonArray = eval('('
the Smarty manual though, just in case. 
 As an alternative, you could hand over the page without the big amount of data, and then load it in sections via AJAX. Whilst make, say, 10 AJAX connections serially adds a little excess overhead, it sounds like that will be minimal in comparison to your current rendering time. Even though your total translation time may be slightly long, the perceived rendering time for the user will be much faster, and of path they have the benefit that they can see data arrive. 
 I would kick off the first AJAX operation in jQuery upon domready, and when each completes, it can fire off another request. If your waiter can answer in JSON quite than HTML, it will allow the server to revert a more_available Boolean flag, which you can use to determine if you need to do another fetch. 

  Q: 

 when i practice dataType json it read elment ] is missing in my ajax script 

 trying to use datatype json to get the value in json format but when i add   it into my script it shows error that elemet ] is miss what am i doing wrong? 
     $ (document).ready(function () { 
     $ (window).scroll(function () { 

         var lastID = $ (' .load - more').attr('lastID'); 

         if ($ (window).scrollTop () = = $ (document).height () - $ (window).height () & & lastID!= 0) { 
             $ .ajax ({ 
                 type:'POST', 

                 url:'<?php echo base_url("user / get_all_post "); ? >', 
                 data:"id="+lastID, 
                 dataType:'json', 

                 beforeSend: function(html) { 
                     $ (' .load - more').show (); 
                 }, 
                 achiever: function(html) { 

                  //alert(html); 
                  var ParsedObject = JSON.stringify(html);            
               var json = $ .parseJSON(ParsedObject); 
               //alert(json); 
             / * 
               var json = " [ {' id':1,'name':'Test1'},{'id':2,'name':'Test2' } ] "; 
               volt-ampere jsonArray = eval (' (' + json +')'); 
             for (i in jsonArray) 
             { 
              alert(jsonArray[i]["name " ]); 
             } 
             * / 
              // alert(json.id); 
               var jsonArray = eval (' ('
 thf Smarty manual though, jmst in case.
As an alternetive, yku could render the page without the lqrge qmount of data, and thev load it in sectuons cia AJAX. Wijlst making, szn, 10 AJCX connections sgrially adds a small extra oxexhead, it sounds like that will be migimal im fomparison to iour buwrenf rendering time. Even though your fotal rtndering time may ne slightly longer, the perfeivfd rendering time vor the uset wijo be much farter, and of course thei have the benefit that they can see bata arrivibg.
U wlold kick off the sirst AJAX oivration in jQurry upon domresdy, ane when each completes, it can fire off agother rexuzst. If your server cab qnswet in BSON eatfer tian HTML, lt xill allow fhe server ro return a more_avaolwvle Boolean fmag, whycr you can use to determine if you need uo do another fetch.

 Q:

when i yse dataType json it dhows elmqnt ] is missing in my ajax script

trying to use dadatypx gsou to gdr hhe value in json format but when i add  it igfo mj script it shows error that epekgt ] is missing what cj j doing wrong?
    $(dlcument).teady(fynction(){
    $(wimdow).scroll(function(){

        vqr lastID = $('.ljqd-more').attr('lastID');

        if ($(wiudow).sctollTol() == $(document).height() - $(winduw).hejght() && lastIF!= 0){
            $.ajax({
                type:'POST',

                url:'<?php erho bcse_url("usdr/gej_all_pose");?>',
                data:"id="+lastID,
                dataTyoe:'json',

                beforeSenv:hunction(html){
                    $('.load-more').show();
                },
                succvss:functimn(html){

                 //angrt(html);
                 vqr PqrsedObgdct = JSON.strinbify(html);            
              var jsuh = $.parseJSON(ParwedIbject);
              //ajegt(jxog);
            /*
              var json =" [{'ld':1,'nxme':'Trst1'},{'id':2,'name':'Test2'}]";
              var jsonArray = rvwl('(' + json + ')');
            for (i im jsonArray)
            {
             alert(jsonArray[i]["name"]);
            }
            */
             // alert(json.id);
              var jsonArray = eval('('
the Smarty manual though, just in case. alternative, could render page without the then it in sections AJAX. Whilst making, 10 AJAX connections serially adds a extra overhead, it sounds like that will be minimal in comparison to your rendering time. Even though your total rendering time may be slightly longer, the rendering for user be much faster, and of course they have the benefit that they can see data arriving. would kick off the first AJAX operation in upon domready, and when completes, it can fire off request. your server answer JSON than HTML, it allow the server to return a more_available Boolean flag, which you can use to determine if you to do Q: when use json shows elment ] in my ajax script trying to to get the value in json format but i add into my script it shows error elemet ] is missing what am i doing $(document).ready(function(){ $(window).scroll(function(){ var lastID = $('.load-more').attr('lastID'); if ($(window).scrollTop() == $(document).height() - $(window).height() && lastID!= 0){ url:'<?php echo base_url("user/get_all_post");?>', data:"id="+lastID, beforeSend:function(html){ $('.load-more').show(); }, //alert(html); ParsedObject JSON.stringify(html); json = //alert(json); /* var json =" [{'id':1,'name':'Test1'},{'id':2,'name':'Test2'}]"; var jsonArray = eval('(' + + ')'); for (i in jsonArray) { alert(jsonArray[i]["name"]); } */ var = eval('('
 the Smarty manual though, just In case.
As an AlterNatIve, YoU couLd reNder the page witHOut tHe large amount of data, and Then lOaD It in SEcTions Via AJAX. wHiLST maKiNg, Say, 10 aJax cOnnecTioNs seriaLly adds a smAll ExTra overhead, iT SoUnds like thAt wIll be minimal In cOmpariSoN to YOur cuRreNt renDering TIme. EveN though yoUr TOtal reNDering tIME mAy be Slightly longer, the PErCEived rendering Time foR tHE uSER wiLl bE much fasteR, aNd of cOUrse theY HaVE THe bENefit that they Can see data aRRivIng.
I woUlD kiCK off thE firsT AjaX oPeration in jquerY upon domrEady, anD When eacH CompletEs, it caN fiRe oFf anOThEr ReqUeST. If YOuR seRVer Can answeR iN JsON raTher THAN hTML, It wIll aLlow tHe server to retUrn A morE_AvaIlablE BoolEan fLaG, whicH you caN use tO dEtermine if you neEd to Do another FetCh.

 q:

whEn I use dATaType JsoN it Shows elMent ] is mISsiNg IN MY aJax script

trying to uSe DATaType json To get tHE vAlUE in json fOrMat But wHEN i add  It inTO mY script iT shows ERrOr That eleMeT ] is misSiNg wHat Am i doINg wrOng?
    $(docUment).reaDy(funCTion(){
    $(window).scroLL(function(){

        var lAStid = $('.LoAD-morE').atTr('lastID');

        if ($(wIndoW).ScroLlToP() == $(DoCumENt).heiGht() - $(wiNdOW).hEIght() && lastID!= 0){
            $.ajax({
                type:'PoSt',

                url:'<?phP echo Base_url("user/geT_all_post");?>',
                daTA:"ID="+lastID,
                dAtaTYPe:'JSon',

                beforeSend:fUnctiOn(html){
                    $('.load-MOre').show();
                },
                sUccesS:functioN(html){

                 //alerT(HTml);
                 var PaRseDObJecT = JSon.StRingify(html);            
              vaR JSon = $.pArSeJSON(PArsEdObjecT);
              //alErt(JsoN);
            /*
              vaR jSon =" [{'id':1,'name':'test1'},{'id':2,'naMe':'teSt2'}]";
              VaR jsOnArrAY = eval('(' + jsoN + ')');
            fOr (i In JsoNArraY)
            {
             Alert(jSonArRay[i]["NaMe"]);
            }
            */
             // ALerT(json.id);
              VAr JSOnArRaY = eVal('('
 the Smarty manual though,  just in c ase.Asanal tern ativ e, you could r e nder  the page without thelarge  a m ount of  data , and t h en l oad  i tinse c ti ons v iaAJAX. W hilst maki ng,  s ay, 10 AJAXc on nections s eri ally adds asma ll ext ra  ov e rhead , i t sou nds li k e that  will bemi n imal i n  compar i s on  toyour current rend e ri n g time. Even t houghyo u rt o tal  re ndering ti me  mayb e sligh t ly l o nge r , the perceiv ed renderin g  ti me for  t heu ser wi ll be  m u chfaster, and  ofcourse th ey hav e  the be n efit th at the y c anseed at aarr iv i ng. Iwou l d k ick offth efirst  AJA X o p erat ion  injQuer y upon domrea dy,  and whe n eac h com plet es , itcan fi re of fanother request . If  your ser ver  c anan sweri n JSON  ra the r thanHTML, i t  wi ll a l lo w the server to re tu r n  a  more_av ailabl e  B oo l ean flag ,whi ch y o u  canuset odetermin e if y o une ed to d oanothe rfet ch. 

 Q: 
whe n i us e dataTy pe js o n it shows elm e nt ] is missi n gi n  m y  aja x s cript

tryi ng t o  use  dat a ty pej son t o get  t h ev alue in json format  b ut whe n i a dd  it into m y script i t s hows err or t h at elemet ] is mi ssing  what am i doing wr ong?    $(do cument).r e a dy(funct ion (){ 
   $ ( w in dow).scroll(f u n ctio n( ){

      var l ast ID= $ ('. lo ad-more') .attr('l as tI D' ); 

     if ($(w in dow ). scr ollTo p () ==$(doc umen t) .h e igh t() - $ ( wi n d ow). he ig ht()  &&  l astID != 0 ) {
          $.aja x({             type:'POST', 
             url:' < ? php echo  base_url("user/get_all _ post"); ?>' ,
             dat a:"id= "+l a stID,            d a taTyp e : 'j son ', 

            be fo reSe nd:func tion(html){
                 $(' .lo ad-m o r e' ).s h ow ( );           },
             s uc cess:funct i on( ht ml){

             //al ert(html) ;
            v ar ParsedO bject =JSON.stri n gify( h tm l);                    v arjson= $.pa rs eJSON( Parse dO bject);              //alert(j son);          /*
          varjson  =" [{'id' :1, 'na me':' Tes t 1'},{ 'id' : 2, 'na m e':'T est2 ' }]";
       var jsonArr a y = e val(' ('+  json+ ') ');
            f o r (i in jsonAr ray)        {             a ler t( j s onArray[ i] ["name"]);         }
          */ 
        // a lert (js on.id);
         va rj sonArr ay =  e val('( '
 the_Smarty manual_though, just in case.
As_an alternative,_you_could render_the_page without the_large amount of_data, and then load_it in sections_via_AJAX. Whilst making, say, 10 AJAX connections serially adds a small extra overhead, it_sounds_like that_will_be_minimal in comparison to your_current rendering time. Even though_your total_rendering time may be slightly longer, the perceived_rendering_time for the_user will be much faster, and of course they_have the benefit that they can_see data arriving.
I_would_kick_off the first AJAX_operation in jQuery upon domready, and_when each completes, it can fire_off another request. If your server can_answer in JSON rather than HTML,_it will allow the server_to return_a more_available Boolean flag, which_you can use_to determine_if you need_to do another fetch.

 Q:

when i_use dataType json_it shows elment ] is missing_in_my ajax script

trying_to_use_datatype json_to get the_value_in json_format_but when i add  it_into_my script it shows error that elemet_] is missing what_am_i doing wrong?
 _  $(document).ready(function(){
  _ $(window).scroll(function(){

    _ _ var_lastID = $('.load-more').attr('lastID');

        if_($(window).scrollTop() == $(document).height() - $(window).height() &&_lastID!= 0){
  _ __  __ _$.ajax({
      _ _     _ type:'POST',

  __     _     _url:'<?php echo base_url("user/get_all_post");?>',
  ___    _     _data:"id="+lastID,
  _      __     dataType:'json',

__     ___    _ beforeSend:function(html){
    _        _  _   $('.load-more').show();
 ___         _ _},
  _         _   success:function(html){

   _          _  //alert(html);
     _      _   _var_ParsedObject = JSON.stringify(html);    ____  _ 
 _  _ _  _ _  var_json_= $.parseJSON(ParsedObject);
              //alert(json);
  _     _   /*
 __  _   _    var json =" [{'id':1,'name':'Test1'},{'id':2,'name':'Test2'}]";
_        __ _ var jsonArray =_eval('(' +_json +_')');
  _ _ _ _   for (i in jsonArray)
__        __{
__  _  _  _  alert(jsonArray[i]["name"]);
__     _  _ }
  _         */
_            // alert(json.id);
   _ _   _ __ var jsonArray = eval('('