Modify 1/20 text when displaying DB results (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


wlp -> Modify 1/20 text when displaying DB results (4/2/2001 22:55:00)

This is an after thought I would like to modify the default text used when displaying 20 records of 300. Or "3/5" 3 pages of 5. Ideally I would like to display a gif or jpg with nice graphics to click on .Also record count so that I can inform the user they are vieing 50 of 300 etc.

thanks

John Stafford





Vince from Spain -> RE: Modify 1/20 text when displaying DB results (4/3/2001 20:29:00)

if you look in your web in _fpclass/fpdbrgn2.inc, around line 36, you should see a line something like . . .
Response.Write " [" & fp_iAbsPage & "/" & fp_rs.PageCount & "]

You can modify that to should the "records returned" information as and how you like.

Do back-up a copy of it first though

All the best

Vince

------------------
Internet Business Solutions S.L.(Spain)





wlp -> RE: Modify 1/20 text when displaying DB results (4/13/2001 13:27:00)

Thanks Vince Sorry for the delay. I really would like to display (as on this site) just the page numbers as a hyperlink (i guesss) i.e. 1 2 3 (underlinded until they are an active hyperlink. Any thoughts?

John





Spooky -> RE: Modify 1/20 text when displaying DB results (4/13/2001 21:46:00)

Ultimately, it will be easier to use an asp version such as :

http://www.learnasp.com/learn/dbtablepaged.asp





Vince from Spain -> RE: Modify 1/20 text when displaying DB results (4/14/2001 19:42:00)

I think it can be done though.
In fpdbrgn1.inc, change the code between lines 214 and 227, which should start with
select case fp_sMoveType
. . . and end with
end select
. . . and replace all that with . . .
if fp_sMoveType <> "" then
fp_rs.AbsolutePage = fp_sMoveType
end if

Then, in fpdbrgn2.inc, we are going to change everything between the <FORM> and </FORM> tags. Search for those lines, and replace everything inbetween with this code.

%>
<SCRIPT language="javascript">
function changepage(page) {
document.<%=fp_sFormName%>.<%=fp_sFormKey%>.value = page;
document.<%=fp_sFormName%>.submit();
}
</script>
<%
Response.Write "<FORM NAME=""" & fp_sFormName & """ ACTION=""" & fp_sPagePath & """ TARGET=""_self"" METHOD=POST>"
Response.Write "<INPUT TYPE=""hidden"" name=" & Chr(34) & fp_sFormKey & Chr(34) & " value=""3"">"
for index=1 to fp_rs.PageCount
if index = fp_iAbsPage then
Response.Write index & " "
else
Response.Write "<a href=""javascript:changepage("&index&")"">"&index&"</a> "
end if
next

' remember names and values used in query
for each fp_sKey in fp_dictInputs
fp_sVal = fp_dictInputs.Item(fp_sKey)
Response.Write "<INPUT TYPE=HIDDEN NAME=""" & fp_sKey & """ VALUE=""" & fp_sVal & """>"
next
Response.Write "</FORM>"

You never know, it might just work

Vince

------------------
Internet Business Solutions S.L.(Spain)





wlp -> RE: Modify 1/20 text when displaying DB results (4/16/2001 20:21:00)

Thanks spooky and Vince I will try these to see which works best.

John





wlp -> RE: Modify 1/20 text when displaying DB results (4/17/2001 21:49:00)

Vince I tried your suggested changes and the asp page wasn't recognized. I have not had the time to dig deeper as to why, just thought I would keep you informed. I will try spooky's suggestion although with that I have to change all of my asp dB serving pages I think I have nine. I would prefer to change a file which is access by each page when needed, which is the case with your suggestion if I am not mistaken?

Thanks

John





Spooky -> RE: Modify 1/20 text when displaying DB results (4/18/2001 20:13:00)

Yep, the include is used by all pages, but it is a bandaid solution as you need to be VERY careful that FP doesnt overwrite the file (which it will do each time you modify the web)




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125