各位大神,我是新手,我现在是用dreamweaver可视化界面做了个搜索结果页面,现在碰到搜索出来的结果,要是有2页就出现问题了,点击下一页就没有搜索结果,我知道这是分页参数问题,但由于技术原因,,,自己解决不了恳请各位大神帮忙看看需要怎么修改。。。。
PS:我知道各位大神看不上用dreamweaver自带弄出来的代码。。但由于本人是自学所以先想看看dreamweaver弄出来的代码,然后再试着自己编写代码
以下是我的搜索页面代码:
"")Then
Recordset1__MM=Request.Form("qymc")
EndIf
%>
"")Then
Recordset1__NN=Request.Form("fwlly")
EndIf
%>
-1)Then
If(Recordset1_first>Recordset1_total)Then
Recordset1_first=Recordset1_total
EndIf
If(Recordset1_last>Recordset1_total)Then
Recordset1_last=Recordset1_total
EndIf
If(Recordset1_numRows>Recordset1_total)Then
Recordset1_numRows=Recordset1_total
EndIf
EndIf
%>
0)Then
Recordset1.MoveFirst
Else
Recordset1.Requery
EndIf
'setthenumberofrowsdisplayedonthispage
If(Recordset1_numRowsRecordset1_total)Then
Recordset1_numRows=Recordset1_total
EndIf
'setthefirstandlastdisplayedrecord
Recordset1_first=1
Recordset1_last=Recordset1_first+Recordset1_numRows-1
If(Recordset1_first>Recordset1_total)Then
Recordset1_first=Recordset1_total
EndIf
If(Recordset1_last>Recordset1_total)Then
Recordset1_last=Recordset1_total
EndIf
EndIf
%>
"")Then
MM_paramIsDefined=(Request.QueryString(MM_paramName)"")
EndIf
%>
0)then
'useindexparameterifdefined,otherwiseuseoffsetparameter
MM_param=Request.QueryString("index")
If(MM_param="")Then
MM_param=Request.QueryString("offset")
EndIf
If(MM_param"")Then
MM_offset=Int(MM_param)
EndIf
'ifwehavearecordcount,checkifwearepasttheendoftherecordset
If(MM_rsCount-1)Then
If(MM_offset>=MM_rsCountOrMM_offset=-1)Then'pastendormovelast
If((MM_rsCountModMM_size)>0)Then'lastpagenotafullrepeatregion
MM_offset=MM_rsCount-(MM_rsCountModMM_size)
Else
MM_offset=MM_rsCount-MM_size
EndIf
EndIf
EndIf
'movethecursortotheselectedrecord
MM_index=0
While((NotMM_rs.EOF)And(MM_index
MM_rsCount)Then
MM_size=MM_rsCount
EndIf
EndIf
'ifwewalkedofftheend,settheoffsetbasedonpagesize
If(MM_rs.EOFAndNotMM_paramIsDefined)Then
If(MM_offset>MM_rsCount-MM_sizeOrMM_offset=-1)Then
If((MM_rsCountModMM_size)>0)Then
MM_offset=MM_rsCount-(MM_rsCountModMM_size)
Else
MM_offset=MM_rsCount-MM_size
EndIf
EndIf
EndIf
'resetthecursortothebeginning
If(MM_rs.CursorType>0)Then
MM_rs.MoveFirst
Else
MM_rs.Requery
EndIf
'movethecursortotheselectedrecord
MM_index=0
While(NotMM_rs.EOFAndMM_index
-1)Then
If(Recordset1_first>MM_rsCount)Then
Recordset1_first=MM_rsCount
EndIf
If(Recordset1_last>MM_rsCount)Then
Recordset1_last=MM_rsCount
EndIf
EndIf
'setthebooleanusedbyhideregiontocheckifweareonthelastrecord
MM_atTotal=(MM_rsCount-1AndMM_offset+MM_size>=MM_rsCount)
%>
"")Then
MM_removeList=MM_removeList&"&"&MM_paramName&"="
EndIf
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
'addtheURLparameterstotheMM_keepURLstring
ForEachMM_itemInRequest.QueryString
MM_nextItem="&"&MM_item&"="
If(InStr(1,MM_removeList,MM_nextItem,1)=0)Then
MM_keepURL=MM_keepURL&MM_nextItem&Server.URLencode(Request.QueryString(MM_item))
EndIf
Next
'addtheFormvariablestotheMM_keepFormstring
ForEachMM_itemInRequest.Form
MM_nextItem="&"&MM_item&"="
If(InStr(1,MM_removeList,MM_nextItem,1)=0)Then
MM_keepForm=MM_keepForm&MM_nextItem&Server.URLencode(Request.Form(MM_item))
EndIf
Next
'createtheForm+URLstringandremovetheintial'&'fromeachofthestrings
MM_keepBoth=MM_keepURL&MM_keepForm
If(MM_keepBoth"")Then
MM_keepBoth=Right(MM_keepBoth,Len(MM_keepBoth)-1)
EndIf
If(MM_keepURL"")Then
MM_keepURL=Right(MM_keepURL,Len(MM_keepURL)-1)
EndIf
If(MM_keepForm"")Then
MM_keepForm=Right(MM_keepForm,Len(MM_keepForm)-1)
EndIf
'autilityfunctionusedforaddingadditionalparameterstothesestrings
FunctionMM_joinChar(firstItem)
If(firstItem"")Then
MM_joinChar="&"
Else
MM_joinChar=""
EndIf
EndFunction
%>
分 -->
|