Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Showing only 10 records at a time

Reply
Thread Tools

Showing only 10 records at a time

 
 
Janusz Jasinski
Guest
Posts: n/a
 
      08-04-2003
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>


 
Reply With Quote
 
 
 
 
Gill Bates
Guest
Posts: n/a
 
      08-04-2003
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" <(E-Mail Removed)> wrote in message
news:3f2e37b2$0$11384$(E-Mail Removed) ...
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>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combox not showing same records every time hygum Javascript 4 03-06-2007 06:55 AM
Simple query returns 0 records in asp, but all records in vbscript masg0013@gmail.com ASP General 3 11-02-2006 09:23 AM
Showing records as a Table format =?Utf-8?B?S2VubnkgTS4=?= ASP .Net 1 06-04-2005 07:15 AM
Delete records or update records Dan ASP General 1 05-10-2004 01:25 PM
match muliple header records to associated detail records Luke Airig XML 0 12-31-2003 12:06 AM



Advertisments