title: DataTables save state scroll position
body: <p>I've been looking around on the net for hours about this save scroll position for DataTables, but without any luck. At least not for my case.</p>
  
  <p>According to datatables, to save the state of the scrollbar I need this line of code:</p>
  
  <pre><code>    $(document).ready(function() {
      var oTable = $('#example').dataTable( {
          "sScrollY": "200px",
          "sAjaxSource": "media/data/2500.txt",
          "sDom": "frtiS",
          "bDeferRender": true,
          "bStateSave": true
      } );
  } );
  </code></pre>
  
  <p>But since I'm not having any text file with the data which I can parse it's not working. I'm fetching arrays in the table with PHP and MYSQL.<br/>
  The <code>"bStateSave": true</code> does save every user input like filtering and sorting, except for the scrollbar.</p>
  
  <p>Does anyone know how to solve this?</p>
  
  <p><strong>EDIT</strong>
  Ok somehow I managed to get this working. It seems I had something on true, which shouldn't be. Now, with this <code>"sDom"</code> the savestate of scrolling works, but my GUI is gone...</p>
  
  <p><strong>EDIT</strong>
  My initiation code is:</p>
  
  <pre><code>&lt;!-- DATATABLES ENABLE INIT --&gt;
  &lt;script&gt;
  &lt;?php include ('js/datatables/ordernumhtml.js');?&gt;
  &lt;?php include ('js/datatables/ordercurrency.js');?&gt;
  &lt;?php include ('js/datatables/dataTables.scroller.min.js');?&gt;
      $(document).ready( function () {
          $('#table1').dataTable( {
          "sDom": "frtiS",
          "bDeferRender": false,
          "bStateSave": true,
          "bAutoWidth": true,
          "bInfo": true,
          "sScrollX": "100%",
          "bScrollCollapse": true,
          "bScrollAutoCss": true,
          "bScrollInfinite": false,
          "sScrollY": "350px",
          "bJQueryUI": true,
          "bProcessing": true,
          "aoColumns": [
            { "sType": "num-html" },
            { "sType": "numeric" },
            null,
            null,
            null,
            null,
            null,
            null,
            { "sType": "currency" },
            null,
            { "bSortable": false }
          ]           
        } );  
      } );
  &lt;/script&gt;
  </code></pre>