anchor.diff:              lastScrollTop = currentScroll;
           });
       };
  -    $('#controlls').submit(updateContent);
   
  -    window['onscroll'] = function(e, elName) {debug('onscroll ' + e + ' ' + elName)};
  -    window['onwheel'] = function(e, elName) {debug('onwheel ' + e + ' ' + elName)};
  -    window['onmousewheel'] = function(e, elName) {debug('onmousewheel ' + e + ' ' + elName)};
  +    $('#controlls').submit(function () {
  +        var selected = $('.ui-tabs-selected').index();
  +        var panel = $($('.ui-tabs-panel')[selected - 1]);
  +        numberOfLinesToFetch = parseInt(numberOfLinesInput.val());
  +        startLine = parseInt(startLineInput.val());
  +        $.getJSON(getUrlForFile(filesByIndex[selected], startLine, numberOfLinesToFetch), function (data) {
  +            currentLine = data.lineNumber;
  +            panel.html(data.lines);
  +        });
  +        return false;
  +    });
  +
   </script>
   </body>
   </html>
  
positive.code:             if (!isFetchingLines && isDownScroll && (panel[0].scrollTopMax - 20) <= currentScroll){
                  debug('downward scroll, near bottom - so loading next lines.');
                  isFetchingLines = true;
                  var url = '<aksess:geturl url="/admin/tools/logreader/logfiles/"/>' + filename + '.action?startline=' + (currentLine + numberOfLinesToFetch);
                  debug(url);
                  $.getJSON(url, function(data){
                      isFetchingLines = false;
                      currentLine = data.lineNumber;
                      debug('Results from server: currentLine: ' + currentLine + ' numberOfLinesInFile: ' + data.numberOfLinesInFile + ' numberOfLinesReturned:' + data.numberOfLinesReturned);
  
negative.code:                     + logfile + '.action" class="downloadlogfile"></a></li>')
          }
          $('#logfiles').tabs({
              beforeLoad: function( event, ui ) {
                  ui.ajaxSettings.dataType = 'html';
                  ui.ajaxSettings.dataTypes = ['html'];
                  ui.ajaxSettings.dataFilter = function(result){
                      var data = $.parseJSON(result);
                      startLine = parseInt(data.lineNumber) - parseInt(data.numberOfLinesReturned);
                      currentLine = data.lineNumber;
                      return data.lines;
                  };
                  ui.jqXHR.fail(function(data, errorname, error) {
                      debug(errorname + ' ' + error);
                  });
              },
              activate: function( event, ui ) {
                  var handler = function (e, elName) {
                      debug('onscroll ' + e + ' ' + elName)
                  };
                  ui.oldPanel[0]['onscroll']  = handler;
                  ui.oldPanel[0]['onwheel']  = handler;
                  ui.oldPanel[0]['onmousewheel']  = handler;
  
              }
          });
          registerScrollHandler();
      });
  
      var registerScrollHandler = function(){
          var lastScrollTop = 0;
  