Showing only 10 records at a time

Discussion in 'XML' started by Janusz Jasinski, Aug 4, 2003.

  1. Hi,

    Below is my code to display an XML within a HTML page. I would only like to let the user see 10 records at a time, how do I do this. Also how do I set the navigation for them to go through each page?

    Many thanks,

    Janusz

    *********************************
    <html>
    <head>
    <script type="text/javascript">
    function movenext()
    {
    x=xmldso.recordset
    if (x.absoluteposition < x.recordcount)
    {
    x.movenext()
    }
    }
    function moveprevious()
    {
    x=xmldso.recordset
    if (x.absoluteposition > 1)
    {
    x.moveprevious()
    }
    }
    </script>
    <title>.: carer details :.</title>
    </head>
    <body bgcolor="#FFFFFF">
    <font size="2"> <xml id="xmldso_list" src="carer_client_details.xml"></xml>
    <table width="100%" border="1" datasrc="#xmldso_list">
    <thead>
    <tr align="left">
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">1</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">2</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">3</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">4</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">5</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">6</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">7</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">8</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">9</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">10</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">11</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">12</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">13</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">14</font> </font>
    </center>
    </th>
    </tr>
    </thead>
    <tr align="left">
    <td><div datafld="admin_area">
    </td>
    <td><div datafld="file_ref">
    </td>
    <td><div datafld="title">
    </td>
    <td><div datafld="forename_1">
    </td>
    <td><div datafld="forename_2">
    </td>
    <td><div datafld="surname">
    </td>
    <td><div datafld="address_line">
    </td>
    <td><div datafld="district">
    </td>
    <td><div datafld="village">
    </td>
    <td><div datafld="town">
    </td>
    <td><div datafld="county">
    </td>
    <td><div datafld="postcode">
    </td>
    <td><div datafld="phone_number">
    </td>
    <td><div datafld="birthdate">
    </td>
    </tr>
    </table>
    </body>
    </html>
    Janusz Jasinski, Aug 4, 2003
    #1
    1. Advertising

  2. Janusz Jasinski

    Gill Bates Guest

    Introduce some variables to keep track of what records are shown. (look at
    Script and PHP, depending on where (client or server) you want to de the
    processing)
    If you really want to send all records to the client (instead of sending
    only 10 from the total collection at the server) you can use
    style....invisible...
    You should look into style (CSS) anyway cause the FONT stuff in the code
    below is outdated, keeps repeating itself thereby making the code big and
    unreadable.
    Take a quick course at www.w3schools.com for example




    "Janusz Jasinski" <> wrote in message
    news:3f2e37b2$0$11384$...
    Hi,

    Below is my code to display an XML within a HTML page. I would only like to
    let the user see 10 records at a time, how do I do this. Also how do I set
    the navigation for them to go through each page?

    Many thanks,

    Janusz

    *********************************
    <html>
    <head>
    <script type="text/javascript">
    function movenext()
    {
    x=xmldso.recordset
    if (x.absoluteposition < x.recordcount)
    {
    x.movenext()
    }
    }
    function moveprevious()
    {
    x=xmldso.recordset
    if (x.absoluteposition > 1)
    {
    x.moveprevious()
    }
    }
    </script>
    <title>.: carer details :.</title>
    </head>
    <body bgcolor="#FFFFFF">
    <font size="2"> <xml id="xmldso_list" src="carer_client_details.xml"></xml>
    <table width="100%" border="1" datasrc="#xmldso_list">
    <thead>
    <tr align="left">
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">1</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">2</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">3</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">4</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">5</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">6</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">7</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">8</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">9</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">10</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">11</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">12</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">13</font> </font>
    </center>
    </th>
    <th><center>
    <font size="2"> <font face="Verdana, Arial, Helvetica,
    sans-serif">14</font> </font>
    </center>
    </th>
    </tr>
    </thead>
    <tr align="left">
    <td><div datafld="admin_area">
    </td>
    <td><div datafld="file_ref">
    </td>
    <td><div datafld="title">
    </td>
    <td><div datafld="forename_1">
    </td>
    <td><div datafld="forename_2">
    </td>
    <td><div datafld="surname">
    </td>
    <td><div datafld="address_line">
    </td>
    <td><div datafld="district">
    </td>
    <td><div datafld="village">
    </td>
    <td><div datafld="town">
    </td>
    <td><div datafld="county">
    </td>
    <td><div datafld="postcode">
    </td>
    <td><div datafld="phone_number">
    </td>
    <td><div datafld="birthdate">
    </td>
    </tr>
    </table>
    </body>
    </html>
    Gill Bates, Aug 4, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Airig
    Replies:
    0
    Views:
    785
    Luke Airig
    Dec 31, 2003
  2. flamesrock
    Replies:
    8
    Views:
    449
    Hendrik van Rooyen
    Nov 24, 2006
  3. Dan

    Delete records or update records

    Dan, May 10, 2004, in forum: ASP General
    Replies:
    1
    Views:
    460
    Ray at
    May 10, 2004
  4. Replies:
    3
    Views:
    653
    Anthony Jones
    Nov 2, 2006
  5. hygum
    Replies:
    4
    Views:
    102
    hygum
    Mar 6, 2007
Loading...

Share This Page