|
|
|
|
![]() ![]() |
Mar 8 2007, 12:21 AM
Post
#1
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 660 Joined: 31-August 06 From: Singapore Member No.: 29,189 |
A wierd problem I am encountering here ... I would appreciate it if I can get any advice ASAP
I have tried to use paging in my page. It seems to be working fine when I put it with the main block of SQL codes CODE <% Dim Conn 'Connection to Database Dim RS 'RecordSet Dim SQL 'String for SQL Statements Set Conn = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.recordset") Conn.Open strConn cMaxTopLevel = 8 i_pagenum = 1 SQL = "SELECT * FROM PROMO_CORNETTO_ROYALE" RS.open SQL,Conn,3,3 i_pagenum=1 if request("page")>1 then i_pagenum=request("page") RS.pageSize=cMaxTopLevel for indx = 1 to RS.Pagecount if indx <> Cint(i_pagenum) then response.write "<a href=view1.asp?page=" & indx & ">" & indx & "</a> " else current_page = indx Response.write "<b><font face=""Arial"" size=""2"">" & indx & "</font></b> " end if next if i_pagenum>1 then RS.AbsolutePage=i_pagenum else 'dont set RS.AbsolutePage end if %> However when I attempt to put this with the html portion like this: CODE <span class="text">Page <% for indx = 1 to RS.Pagecount if indx <> Cint(i_pagenum) then response.write "<a href=view1.asp?page=" & indx & ">" & indx & "</a> " else current_page = indx Response.write "<b><font face=""Arial"" size=""2"">" & indx & "</font></b> " end if next if i_pagenum>1 then RS.AbsolutePage=i_pagenum else 'dont set RS.AbsolutePage end if %> </span> The page does not refresh when I click on another one. Can anyone tell me what is the problem? It seems really wierd that putting it with the other VB code works and when I bring it to the HTML, it cease to work. I need to complete this portion in less than 4 hrs, so hopefully I get a reply ASAP. |
|
|
|
Mar 8 2007, 12:57 AM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,882 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
I don't do ASP, but open up the file in your browser and then do a View > Source to see what the html output looks like.
Might be a clue in there. Perhaps the anchor tags are not being written properly. The View > Source will tell you. |
|
|
|
Mar 8 2007, 01:21 AM
Post
#3
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 660 Joined: 31-August 06 From: Singapore Member No.: 29,189 |
There is nothing unordinary, I can't seem to picture why the different placing of codes can lead to 2 different results
|
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 27th July 2008 - 02:17 AM |