Hi,
What i want to try and do is have a list of customers but display them in rows of 10, with a next button for more records and also break them up by the start of their surname depending on what letter has been clicked.
I have a basic search page for a list of customers in .asp using javascript.
My sql statement is
"SELECT id,firstname,middlename,surname,postcode FROM Customer ORDER BY surname ASC";
At the moment my page displays all records in a list with a link to the customers full details next to each record.
Like the below:
<td bgcolor="<%=screenColour%>"><%= sqlRS('id')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('firstname')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('middlename')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('surname')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('postcode')%></td>
I am using a loop to change the background colour for each record so ignore the screenColour bit.
Here is an example of what i want to try and do, possibly using divs for each letter in the alphabet and displaying only the one selected:
<div id="A">
... 23 records found with surname starting with A ...
... list of 10 records ...
<a>Link to previous 10 records</a><a>Link to Next 10 records to be displayed</a>
</div>
Links for each letter of the alphabet to choose your filter<a>A</a>,B,C,D,E,F,G ...etc
What i want to try and do is have a list of customers but display them in rows of 10, with a next button for more records and also break them up by the start of their surname depending on what letter has been clicked.
I have a basic search page for a list of customers in .asp using javascript.
My sql statement is
"SELECT id,firstname,middlename,surname,postcode FROM Customer ORDER BY surname ASC";
At the moment my page displays all records in a list with a link to the customers full details next to each record.
Like the below:
<td bgcolor="<%=screenColour%>"><%= sqlRS('id')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('firstname')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('middlename')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('surname')%></td>
<td bgcolor="<%=screenColour%>"><%= sqlRS('postcode')%></td>
I am using a loop to change the background colour for each record so ignore the screenColour bit.
Here is an example of what i want to try and do, possibly using divs for each letter in the alphabet and displaying only the one selected:
<div id="A">
... 23 records found with surname starting with A ...
... list of 10 records ...
<a>Link to previous 10 records</a><a>Link to Next 10 records to be displayed</a>
</div>
Links for each letter of the alphabet to choose your filter<a>A</a>,B,C,D,E,F,G ...etc