The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Hello,
does anyone know how i can implementate the
"Simple paging mod"
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=173 on the searche page. (search.asp)
now there is an combox in an form. I have tryit to replace with text but it goes wrong.
anyone an idea? or example?
thanks
<
does anyone know how i can implementate the
"Simple paging mod"
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=173 on the searche page. (search.asp)
now there is an combox in an form. I have tryit to replace with text but it goes wrong.
anyone an idea? or example?
thanks
<
Last edited by ernieek on 05 July 2008, 08:12
Posted
Can you post the code you are trying to use for the search page?<
Posted
Instead of taking you to the pages, it's going back to search.asp with no data. If someone will point out the error, this is done.<
Posted
I will post my code next evening, i can't take the files on this moment.
i try it to copy the code soon as possible<
i try it to copy the code soon as possible<
Posted
this is the code
I have only changed the function DropDownPaging. the function DropDownPagingOld is the original function of the search page.
================================================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
response.write "<td bgcolor="""&strHeadCellColor&""" nowrap>"
response.write "<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&fLang("L_Search054")
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""search.asp?whichpage=1"&SearchLink&"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#171;</font></a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""search.asp?whichpage="&counter&SearchLink&"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&counter&"</font></a>" else response.write " <strong>"&counter&"</strong>"
next
if MaxPageToShow<maxpages then response.write " <a href=""search.asp?whichpage="&maxpages&SearchLink&"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#187;</font></a>"
response.write " (of "&maxpages&")"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</font></td>"
top="0"
end sub
================================================================
sub DropDownPagingold(fnum)
if maxpages > 1 then
if mypage = "" then
pge = 1
else
pge = mypage
end if
scriptname = request.servervariables("script_name")
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
if fnum = 1 then
Response.Write(" <b>" & fLang("L_Search054") & " </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
else
Response.Write(" <b>" & fLangN("L_Search055",maxpages) & " </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
end if
for counter = 1 to maxpages
if counter <> cLng(pge) then
Response.Write " <option value=""" & counter & """>" & counter & "</option>" & vbNewLine
else
Response.Write " <option selected value=""" & counter & """>" & counter & "</option>" & vbNewLine
end if
next
if fnum = 1 then
Response.Write(" </select><b> " & fLangN("L_Search056",maxPages) & "</b>" & vbNewLine)
else
Response.Write(" </select>" & vbNewLine)
end if
Response.Write(" </font></td>" & vbNewLine)
Response.Write(" </form>" & vbNewLine)
end if
end sub
================================================================
<
I have only changed the function DropDownPaging. the function DropDownPagingOld is the original function of the search page.
================================================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
response.write "<td bgcolor="""&strHeadCellColor&""" nowrap>"
response.write "<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&fLang("L_Search054")
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""search.asp?whichpage=1"&SearchLink&"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#171;</font></a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""search.asp?whichpage="&counter&SearchLink&"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&counter&"</font></a>" else response.write " <strong>"&counter&"</strong>"
next
if MaxPageToShow<maxpages then response.write " <a href=""search.asp?whichpage="&maxpages&SearchLink&"""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#187;</font></a>"
response.write " (of "&maxpages&")"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</font></td>"
top="0"
end sub
================================================================
sub DropDownPagingold(fnum)
if maxpages > 1 then
if mypage = "" then
pge = 1
else
pge = mypage
end if
scriptname = request.servervariables("script_name")
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
if fnum = 1 then
Response.Write(" <b>" & fLang("L_Search054") & " </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
else
Response.Write(" <b>" & fLangN("L_Search055",maxpages) & " </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
end if
for counter = 1 to maxpages
if counter <> cLng(pge) then
Response.Write " <option value=""" & counter & """>" & counter & "</option>" & vbNewLine
else
Response.Write " <option selected value=""" & counter & """>" & counter & "</option>" & vbNewLine
end if
next
if fnum = 1 then
Response.Write(" </select><b> " & fLangN("L_Search056",maxPages) & "</b>" & vbNewLine)
else
Response.Write(" </select>" & vbNewLine)
end if
Response.Write(" </font></td>" & vbNewLine)
Response.Write(" </form>" & vbNewLine)
end if
end sub
================================================================
<
Posted
Hello,
I have changed the code to this:
The only thing that not work is the wichpage.
=============================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
response.write "<td bgcolor="""&strHeadCellColor&""" nowrap>"
response.write "<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&fLang("L_Search054")
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""#"" onClick=""ChangePage("& fnum &");""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#171;</font></a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""#"" onClick=""ChangePage(" & fnum & ");""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&counter&"</font></a>" else response.write " <strong>"&counter&"</strong>"
next
if MaxPageToShow<maxpages then response.write " <a href=""#"" onClick=""ChangePage(" & fnum & ");""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#187;</font></a>"
response.write " (of "&maxpages&")"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</font></td>"
Response.Write(" </form>" & vbNewLine)
top="0"
end sub
<
I have changed the code to this:
The only thing that not work is the wichpage.
=============================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
response.write "<td bgcolor="""&strHeadCellColor&""" nowrap>"
response.write "<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&fLang("L_Search054")
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""#"" onClick=""ChangePage("& fnum &");""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#171;</font></a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""#"" onClick=""ChangePage(" & fnum & ");""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>"&counter&"</font></a>" else response.write " <strong>"&counter&"</strong>"
next
if MaxPageToShow<maxpages then response.write " <a href=""#"" onClick=""ChangePage(" & fnum & ");""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>#187;</font></a>"
response.write " (of "&maxpages&")"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</font></td>"
Response.Write(" </form>" & vbNewLine)
top="0"
end sub
<
Last edited by ernieek on 05 July 2008, 07:13
Posted
it's works!
i changed the following:
===============================================================
Add this function script under
function ChangePage(fnum)
===============================================================
Response.Write " <script language=""javascript"" type=""text/javascript"">" & vbNewLine & _
" <!--" & vbNewLine & _
" function changeValue(PagN,to) {" & vbNewLine & _
" theForm = document.forms['PageNum'+PagN];" & vbNewLine & _
" theForm.elements['whichpage'].value = to;" & vbNewLine & _
" theForm.submit();" & vbNewLine & _
" }" & vbNewLine & _
" //-->" & vbNewLine & _
" </script>" & vbNewLine
==============================================================
the new DropDownpaging Function:
===============================================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
Response.Write " <input name=""whichpage"" type=""hidden"" value="""">" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
Response.Write "<td nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if fnum = 1 then
Response.Write(" <b>"&fLang("L_Search054")&"</b> [")
else
Response.Write(" <b>"& fLangN("L_Search055",maxPages) &"</b>[")
end if
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""#"" onClick=""changeValue("&fnum &",1)""><<</a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""#"" onClick=""changeValue("&fnum &","&counter&")"">"&counter&"</a> " else response.write " <strong>"&counter&"</strong> "
next
if MaxPageToShow<maxpages then response.write " <a href=""#"" onClick=""changeValue("&fnum &","&maxpages&")"">>></a> "
response.write " ]"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</font></td>"
Response.Write(" </form>" & vbNewLine)
top="0"
end sub
===============================================================<
i changed the following:
===============================================================
Add this function script under
function ChangePage(fnum)
===============================================================
Response.Write " <script language=""javascript"" type=""text/javascript"">" & vbNewLine & _
" <!--" & vbNewLine & _
" function changeValue(PagN,to) {" & vbNewLine & _
" theForm = document.forms['PageNum'+PagN];" & vbNewLine & _
" theForm.elements['whichpage'].value = to;" & vbNewLine & _
" theForm.submit();" & vbNewLine & _
" }" & vbNewLine & _
" //-->" & vbNewLine & _
" </script>" & vbNewLine
==============================================================
the new DropDownpaging Function:
===============================================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
Response.Write " <input name=""whichpage"" type=""hidden"" value="""">" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
Response.Write "<td nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if fnum = 1 then
Response.Write(" <b>"&fLang("L_Search054")&"</b> [")
else
Response.Write(" <b>"& fLangN("L_Search055",maxPages) &"</b>[")
end if
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""#"" onClick=""changeValue("&fnum &",1)""><<</a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""#"" onClick=""changeValue("&fnum &","&counter&")"">"&counter&"</a> " else response.write " <strong>"&counter&"</strong> "
next
if MaxPageToShow<maxpages then response.write " <a href=""#"" onClick=""changeValue("&fnum &","&maxpages&")"">>></a> "
response.write " ]"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</font></td>"
Response.Write(" </form>" & vbNewLine)
top="0"
end sub
===============================================================<
Last edited by ernieek on 05 July 2008, 08:44
Posted
You're missing an "end if" before the "end sub". It should look like this:
<
Code:
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine & _
" <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine & _
" <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine & _
" <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine & _
" <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine & _
" <input name=""whichpage"" type=""hidden"" value="""">" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine) & _
" <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
" <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
Response.Write "<td nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if fnum = 1 then
Response.Write(" <b>"&fLang("L_Search054")&"</b> [")
else
Response.Write(" <b>"& fLangN("L_Search055",maxPages) &"</b>[")
end if
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""#"" onClick=""changeValue("&fnum &",1)""><<</a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""#"" onClick=""changeValue("&fnum &","&counter&")"">"&counter&"</a> " else response.write " <strong>"&counter&"</strong> "
next
if MaxPageToShow<maxpages then response.write " <a href=""#"" onClick=""changeValue("&fnum &","&maxpages&")"">>></a> "
response.write " ]"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</font></td>"
Response.Write(" </form>" & vbNewLine)
top="0"
end if
end sub
Posted
but then we get the error:
Microsoft VBScript compilation error '800a03f8'
Expected 'Sub'
/search.asp, line 794
end if
----^
<
Microsoft VBScript compilation error '800a03f8'
Expected 'Sub'
/search.asp, line 794
end if
----^
<
Posted
@ Carefree
i missed more then 1 end if states.
this code must be okay
===============================================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
Response.Write " <input name=""whichpage"" type=""hidden"" value="""">" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then
Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
end if
Response.Write "<td nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if fnum = 1 then
Response.Write(" <b>"& fLang("L_Search054") &"</b> [")
else
Response.Write(" <b>"& fLangN("L_Search055",maxPages) &"</b>[")
end if
if maxpages>1 then
if mypage-PagesToShow<1 then
MinPageToShow=1
else
MinPageToShow=mypage-PagesToShow
end if
if mypage+PagesToShow>maxpages then
MaxPageToShow=maxpages
else
MaxPageToShow=mypage+PagesToShow
end if
if MinPageToShow>1 then
response.write " <a href=""#"" onClick=""changeValue("&fnum &",1)""><<</a>"
end if
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then
response.write " <a href=""#"" onClick=""changeValue("&fnum &","&counter&")"">"&counter&"</a> "
else
response.write " <strong>"&counter&"</strong> "
end if
next
if MaxPageToShow<maxpages then
response.write " <a href=""#"" onClick=""changeValue("&fnum &","&maxpages&")"">>></a> ]"
else
response.write " ]"
end if
top="0"
response.write "</font></td>"
Response.Write(" </form>" & vbNewLine)
end if
end sub<
i missed more then 1 end if states.
this code must be okay
===============================================================
sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write " <form name=""PageNum" & fnum & """ action=""search.asp?" & chkString(Request.QueryString,"SQLString") & """ method=""post"">" & vbNewLine
Response.Write " <input name=""Search"" type=""hidden"" value=""" & trim(chkString(Request.Form("Search"),"search")) & """>" & vbNewLine
Response.Write " <input name=""andor"" type=""hidden"" value=""" & cLng(Request.Form("andor")) & """>" & vbNewLine
Response.Write " <input name=""Forum"" type=""hidden"" value=""" & cLng(Request.Form("Forum")) & """>" & vbNewLine
Response.Write " <input name=""SearchMessage"" type=""hidden"" value=""" & cLng(Request.Form("SearchMessage")) & """>" & vbNewLine
Response.Write " <input name=""whichpage"" type=""hidden"" value="""">" & vbNewLine
if strArchiveState = "1" and ArchiveView = "true" then
Response.Write(" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine)
Response.Write " <input name=""SearchDate"" type=""hidden"" value=""" & cLng(Request.Form("SearchDate")) & """>" & vbNewLine
if strUseMemberDropDownBox = 0 then
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & chkString(Request.Form("SearchMember"),"display") & """>" & vbNewLine
else
Response.Write " <input name=""SearchMember"" type=""hidden"" value=""" & cLng(Request.Form("SearchMember")) & """>" & vbNewLine
end if
end if
Response.Write "<td nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
if fnum = 1 then
Response.Write(" <b>"& fLang("L_Search054") &"</b> [")
else
Response.Write(" <b>"& fLangN("L_Search055",maxPages) &"</b>[")
end if
if maxpages>1 then
if mypage-PagesToShow<1 then
MinPageToShow=1
else
MinPageToShow=mypage-PagesToShow
end if
if mypage+PagesToShow>maxpages then
MaxPageToShow=maxpages
else
MaxPageToShow=mypage+PagesToShow
end if
if MinPageToShow>1 then
response.write " <a href=""#"" onClick=""changeValue("&fnum &",1)""><<</a>"
end if
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then
response.write " <a href=""#"" onClick=""changeValue("&fnum &","&counter&")"">"&counter&"</a> "
else
response.write " <strong>"&counter&"</strong> "
end if
next
if MaxPageToShow<maxpages then
response.write " <a href=""#"" onClick=""changeValue("&fnum &","&maxpages&")"">>></a> ]"
else
response.write " ]"
end if
top="0"
response.write "</font></td>"
Response.Write(" </form>" & vbNewLine)
end if
end sub<
Last edited by ernieek on 05 July 2008, 15:39
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...