php - Loading data through scrolldown -


I have a web page that shows tabular data,
and I want to know how to scroll data Load Down, Fax Style As such, loading 50 rows, and when you scroll to the end, load more than 50.
I do not know how to specify the question, or else I would have searched with a question, "Maybe somewhere already", but I do not know if I have to use php, javascript or what do I have to Can you indicate?
This is the question page:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; Function Test (id) {window.open ("../ remover / removeemail.php? Id =" + id, 'Favorites', 'MenuBur, Recible, Width = 400, Height = 200'); } Function test2 (id) {window.location = ("../editar/editaemail.php?id=" + id); } & Lt; / Script & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php mysql_connect ("localhost", "root", "") or die ("problema na conexao"); mysql_select_db ("trabalho1"); $ Query = "email SELECT COUNT (id)"; $ Result = mysql_query ($ query) or die (mysql_error ()); While ($ line = mysql_fetch_assoc ($ result)) {foreach ($ $ camp = $ $ row as valor) {if ($ camp == "COUNT (id)") {$ maxemail = $ valor; }}} Order by ordering the name of $ Query = "Select from email group"; $ result = mysql_query ($ query) or die (mysql_error ()); echo "& lt; Center & gt; "echo" & lt; Table border = '2' & gt; \ N "; echo" & lt; Form & gt; "echo" & lt; Tr & gt; & Lt; Td colspan = '3' & gt; Nimmero de email registrar: ". $ Maxmail" algin = 'left' href = '.. / filtrar / filtroemail.php' & gt; Filtur Regalado & lt; / A & gt; & Lt; One align = '& lt; / Td> & Lt; td colspan = '3' right 'href =' .. / inserir / inseriremail.html '& gt; Add email & lt; / A & gt; & Lt; / Td & lt; / Tr & gt; "; Echo" & lt; tr alignment = center '& gt; & Lt; Td> Data de Cíaçà £ o & lt; / Td> & Lt; TD & gt; No & lt; / Td> & Lt; Td> Email & lt; / Td> & Lt; Td> Data is too high Actualiza £ l  & Lt; Td> Remover & lt; / Td> & Lt; Td> Actualizer & lt; / Td> & Lt; / Tr & gt; "; While ($ line = mysql_fetch_array ($ result)) {resonant" & lt; Tr align = 'center' & gt; \ N "; echo" & lt; Td> & Lt; B & gt; & Lt; / B & gt; $ Line ['data'] "& Lt; / td & gt;"; Echo "& lt; td & gt;  B & gt; & lt; / b & gt; $. [Row] ['Nom']" & lt; / TD & gt; "; echo" & lt; Td> & Lt; B & gt; & Lt; / B & gt; $ Line ['email'] "& lt; / td & gt;"; Echo "& lt; td>  ; & lt; / b & gt; $ Line ['DataActual'] "& lt; / td & gt;"; Echo "& lt; td & gt; & lt; input name = 'amminar' type = 'button' onClick = 'test (". $ Row [' id ']. ")' Value = 'remover' & gt; lt; / td & gt; ; Echo "& lt; td & gt; & lt; input name = 'editar' type = 'button' onClick = 'test2 (". $ Row [' id ']. ")' Value = 'Actualizar' & gt; lt; / td & gt; ; Echo "& lt; / form & gt; \ n"; } Echo "& lt; / table & gt; \ n"; Echo "& lt; / center & gt;"; ? & Gt; & Lt; / Body & gt; & Lt; / Html & gt;    

You should use both javascript and php.

Only you will give some hint because you have said that you can not use libraries.

  • Create a divisible table
  • Give the division a certain height and set it vertically vertically (CSS)
  • Onscroll Event (Javascript Tie a listener in
  • In the listener you check that the scroll has reached bottom and if so, then you should call an AJAX php file (JavaScript calls a php file and the page re Gets results without loading)
  • Consult the database and return data (PHP)
  • Add new data to the table (javascript)

    Ajax calls to apply with jQuery very easy But more difficult (if cross browser) without it.

    You can find a tutorial.

    If you need to give more hint to this, comment on my answer and I will include more information in it.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -