|
主题: fireworkd生成菜单问题
|
 911again
职务:普通成员
等级:1
金币:0.0
发贴:97
注册:2002/10/13 7:43:28
|
#12003/6/8 13:21:26
本人用fireworks作了一个菜单,用于插到一个查询页面,当查询面页中的重复记录集只显示一条记录时可以正常显示菜单,而当查询页面中设置重复记录集显示多条记录时菜单则不能显示。 请问如何解决?? 下图为正常显示图片: 如下面第一个图所示:当光标移到填报时间右边的图上时则在1处显示菜单,但实际上菜单显示在2处。 在查询页面的其他记录上则不会显示菜单,如下图: 下面为源码:<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% Dim edit_reco__keyword1 edit_reco__keyword1 = "%" If (Request.QueryString("key01") <> "") Then edit_reco__keyword1 = Request.QueryString("key01") End If %> <% Dim edit_reco__radio1 edit_reco__radio1 = "and" If (request.querystring("andor1") <> "") Then edit_reco__radio1 = request.querystring("andor1") End If %> <% Dim edit_reco__keyword2 edit_reco__keyword2 = "%" If (request.querystring("key02") <> "") Then edit_reco__keyword2 = request.querystring("key02") End If %> <% Dim edit_reco__radio2 edit_reco__radio2 = "and" If (request.querystring("andor2") <> "") Then edit_reco__radio2 = request.querystring("andor2") End If %> <% Dim edit_reco__keyword3 edit_reco__keyword3 = "%" If (request.querystring("key03") <> "") Then edit_reco__keyword3 = request.querystring("key03") End If %> <% Dim edit_reco Dim edit_reco_numRows
Set edit_reco = Server.CreateObject("ADODB.Recordset") edit_reco.ActiveConnection = MM_qlkpone_STRING edit_reco.Source = "SELECT * FROM xyzl WHERE 学号 like '%" + Replace(edit_reco__keyword1, "'", "''") + "%' " + Replace(edit_reco__radio1, "'", "''") + " 姓名 like '%" + Replace(edit_reco__keyword2, "'", "''") + "%' " + Replace(edit_reco__radio2, "'", "''") + " 乡 like '%" + Replace(edit_reco__keyword3, "'", "''") + "%' ORDER BY 学号,乡,村,组,姓名, 性别, 出生年月" edit_reco.CursorType = 0 edit_reco.CursorLocation = 2 edit_reco.LockType = 1 edit_reco.Open()
edit_reco_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index
Repeat1__numRows = 20 Repeat1__index = 0 edit_reco_numRows = edit_reco_numRows + Repeat1__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim edit_reco_total Dim edit_reco_first Dim edit_reco_last
' set the record count edit_reco_total = edit_reco.RecordCount
' set the number of rows displayed on this page If (edit_reco_numRows < 0) Then edit_reco_numRows = edit_reco_total Elseif (edit_reco_numRows = 0) Then edit_reco_numRows = 1 End If
' set the first and last displayed record edit_reco_first = 1 edit_reco_last = edit_reco_first + edit_reco_numRows - 1
' if we have the correct record count, check the other stats If (edit_reco_total <> -1) Then If (edit_reco_first > edit_reco_total) Then edit_reco_first = edit_reco_total End If If (edit_reco_last > edit_reco_total) Then edit_reco_last = edit_reco_total End If If (edit_reco_numRows > edit_reco_total) Then edit_reco_numRows = edit_reco_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them
If (edit_reco_total = -1) Then
' count the total records by iterating through the recordset edit_reco_total=0 While (Not edit_reco.EOF) edit_reco_total = edit_reco_total + 1 edit_reco.MoveNext Wend
' reset the cursor to the beginning If (edit_reco.CursorType > 0) Then edit_reco.MoveFirst Else edit_reco.Requery End If
' set the number of rows displayed on this page If (edit_reco_numRows < 0 Or edit_reco_numRows > edit_reco_total) Then edit_reco_numRows = edit_reco_total End If
' set the first and last displayed record edit_reco_first = 1 edit_reco_last = edit_reco_first + edit_reco_numRows - 1 If (edit_reco_first > edit_reco_total) Then edit_reco_first = edit_reco_total End If If (edit_reco_last > edit_reco_total) Then edit_reco_last = edit_reco_total End If
End If %>
<% Dim MM_paramName %> <% ' *** Move To Record and Go To Record: declare variables
Dim MM_rs Dim MM_rsCount Dim MM_size Dim MM_uniqueCol Dim MM_offset Dim MM_atTotal Dim MM_paramIsDefined
Dim MM_param Dim MM_index
Set MM_rs = edit_reco MM_rsCount = edit_reco_total MM_size = edit_reco_numRows MM_uniqueCol = "" MM_paramName = "" MM_offset = 0 MM_atTotal = false MM_paramIsDefined = false If (MM_paramName <> "") Then MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "") End If %> <% ' *** Move To Record: handle 'index' or 'offset' parameter
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
' use index parameter if defined, otherwise use offset parameter MM_param = Request.QueryString("index") If (MM_param = "") Then MM_param = Request.QueryString("offset") End If If (MM_param <> "") Then MM_offset = Int(MM_param) End If
' if we have a record count, check if we are past the end of the recordset If (MM_rsCount <> -1) Then If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If
' move the cursor to the selected record MM_index = 0 While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1)) MM_rs.MoveNext MM_index = MM_index + 1 Wend If (MM_rs.EOF) Then MM_offset = MM_index ' set MM_offset to the last possible record End If
End If %> <% ' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page MM_index = MM_offset While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size)) MM_rs.MoveNext MM_index = MM_index + 1 Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size If (MM_rs.EOF) Then MM_rsCount = MM_index If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount End If End If
' if we walked off the end, set the offset based on page size If (MM_rs.EOF And Not MM_paramIsDefined) Then If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then If ((MM_rsCount Mod MM_size) > 0) Then MM_offset = MM_rsCount - (MM_rsCount Mod MM_size) Else MM_offset = MM_rsCount - MM_size End If End If End If
' reset the cursor to the beginning If (MM_rs.CursorType > 0) Then MM_rs.MoveFirst Else MM_rs.Requery End If
' move the cursor to the selected record MM_index = 0 While (Not MM_rs.EOF And MM_index < MM_offset) MM_rs.MoveNext MM_index = MM_index + 1 Wend End If %> <% ' *** Move To Record: update recordset stats
' set the first and last displayed record edit_reco_first = MM_offset + 1 edit_reco_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then If (edit_reco_first > MM_rsCount) Then edit_reco_first = MM_rsCount End If If (edit_reco_last > MM_rsCount) Then edit_reco_last = MM_rsCount End If End If
' set the boolean used by hide region to check if we are on the last record MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount) %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone Dim MM_keepURL Dim MM_keepForm Dim MM_keepBoth
Dim MM_removeList Dim MM_item Dim MM_nextItem
' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" End If
MM_keepURL="" MM_keepForm="" MM_keepBoth="" MM_keepNone=""
' add the URL parameters to the MM_keepURL string For Each MM_item In Request.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)) End If Next
' add the Form variables to the MM_keepForm string For Each MM_item In Request.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)) End If Next
' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm If (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) End If If (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) End If If (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) End If
' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %> <% ' *** Move To Record: set the strings for the first, last, next, and previous links
Dim MM_keepMove Dim MM_moveParam Dim MM_moveFirst Dim MM_moveLast Dim MM_moveNext Dim MM_movePrev
Dim MM_urlStr Dim MM_paramList Dim MM_paramIndex Dim MM_nextParam
MM_keepMove = MM_keepBoth MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters If (MM_size > 1) Then MM_moveParam = "offset" If (MM_keepMove <> "") Then MM_paramList = Split(MM_keepMove, "&") MM_keepMove = "" For MM_paramIndex = 0 To UBound(MM_paramList) MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1) If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex) End If Next If (MM_keepMove <> "") Then MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1) End If End If End If
' set the strings for the move to links If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&" End If
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = MM_urlStr & "0" MM_moveLast = MM_urlStr & "-1" MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size) If (MM_offset - MM_size < 0) Then MM_movePrev = MM_urlStr & "0" Else MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size) End If %>
<%
%>
邵东县青年农民科技培训工程--查询结果
<% While ((Repeat1__numRows <> 0) AND (NOT edit_reco.EOF)) %>
| style='font-size:18.0pt;font-family:宋体;"Times New Roman";"Times New Roman"'>县重点班跨世纪青年农民科技培训工程学员
推 荐 审 批 表 | | | 学号: | <%=(edit_reco.Fields.Item("学号").value)%> | 县: | <%=(edit_reco.Fields.Item("县").value)%> | 乡(镇): | <%=(edit_reco.Fields.Item("乡").value)%> | 填报时间: | <%=(edit_reco.Fields.Item("填报日期").value)%> | | style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN-LEFT: -5.1pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-table-layout-alt: fixed; mso-border-alt: solid windowtext .5pt"> 姓 名 | <%=(edit_reco.Fields.Item("姓名").value)%> | 性 别 | <%=(edit_reco.Fields.Item("性别").value)%> | 出生年月 | <%=(edit_reco.Fields.Item("出生年月").value)%> | 政治面貌 | <%=(edit_reco.Fields.Item("政治面貌").value)%> | 文 化
程 度 | <%=(edit_reco.Fields.Item("文化程度").value)%> | 生产经
营年限 | <%=(edit_reco.Fields.Item("经营年限").value)%> | 职务职称 | <%=(edit_reco.Fields.Item("职务职称").value)%> | 参加科技
组 织 | <%=(edit_reco.Fields.Item("参加组织").value)%> | 电 话 | <%=(edit_reco.Fields.Item("电话").value)%> | 民 族 | <%=(edit_reco.Fields.Item("民族").value)%> | 需学习哪些
知识和技术 | <%=(edit_reco.Fields.Item("学习知识").value)%> | 邮 编 | <%=(edit_reco.Fields.Item("邮编").value)%> | 籍 贯 | <%=(edit_reco.Fields.Item("籍贯").value)%> | 地 址 | <%=(edit_reco.Fields.Item("乡").value)%> | 乡(镇) | <%=(edit_reco.Fields.Item("村").value)%> | 村 | <%=(edit_reco.Fields.Item("组").value)%> | 组 | | | 家 庭 生 产 经 营 水 平 | 种植业(名称、规模、效益、人均年收入): | <%=(edit_reco.Fields.Item("种植业").value)%> | 养殖业(名称、规模、效益、人均年收入): | <%=(edit_reco.Fields.Item("养殖业").value)%> | 其他业(名称、规模、效益、人均年收入): | <%=(edit_reco.Fields.Item("其他业").value)%> |
| 村推荐意见: | <%=(edit_reco.Fields.Item("村意见").value)%> | 盖 章 | <%=(edit_reco.Fields.Item("村日期").value)%> |
| 乡(镇)推荐意见: | <%=(edit_reco.Fields.Item("乡意见").value)%> | 盖 章 | <%=(edit_reco.Fields.Item("乡日期").value)%> |
| 县青年农民科技培训工程办公室意见: | <%=(edit_reco.Fields.Item("县意见").value)%> | 盖 章 | <%=(edit_reco.Fields.Item("县日期").value)%> |
| 备注: | <%=(edit_reco.Fields.Item("备注").value)%> | | |
| | style='font-size:18.0pt;font-family:宋体;"Times New Roman";"Times New Roman"'>跨世纪青年农民科技培训工程学员学籍卡 | | | 承培单位: | <%=(edit_reco.Fields.Item("承培单位").value)%> | 班名称: | <%=(edit_reco.Fields.Item("班名称").value)%> | 开班时间: | <%=(edit_reco.Fields.Item("开班时间").value)%> | 学号: | <%=(edit_reco.Fields.Item("学号").value)%> | style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN-LEFT: -5.1pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-table-layout-alt: fixed; mso-border-alt: solid windowtext .5pt"> 姓 名 | <%=(edit_reco.Fields.Item("姓名").value)%> | 性 别 | <%=(edit_reco.Fields.Item("性别").value)%> | 出生年月 | <%=(edit_reco.Fields.Item("出生年月").value)%> | 民 族 | <%=(edit_reco.Fields.Item("民族").value)%> | 照
片 | 籍 贯 | <%=(edit_reco.Fields.Item("籍贯").value)%> | 政治面貌 | <%=(edit_reco.Fields.Item("政治面貌").value)%> | 文化程度 | <%=(edit_reco.Fields.Item("文化程度").value)%> | 住 址 | <%=(edit_reco.Fields.Item("乡").value)%> | 乡(镇) | <%=(edit_reco.Fields.Item("村").value)%> | 村 | <%=(edit_reco.Fields.Item("组").value)%> | 组 | |
| 培训科目 | 集中培训时间
(年月-年月) | 参加学习课时 | 考试考核成绩 | 理论课 | 实践课 | 自学课 | 考试 | 考核 | <%=(edit_reco.Fields.Item("科目1").value)%> | <%=(edit_reco.Fields.Item("日期11").value)%> | - | <%=(edit_reco.Fields.Item("日期12").value)%> | | <%=(edit_reco.Fields.Item("理论1").value)%> | <%=(edit_reco.Fields.Item("实践1").value)%> | <%=(edit_reco.Fields.Item("自学1").value)%> | <%=(edit_reco.Fields.Item("考试1").value)%> | <%=(edit_reco.Fields.Item("考核1").value)%> | <%=(edit_reco.Fields.Item("科目2").value)%> | <%=(edit_reco.Fields.Item("日期21").value)%> | - | <%=(edit_reco.Fields.Item("日期22").value)%> | | <%=(edit_reco.Fields.Item("理论2").value)%> | <%=(edit_reco.Fields.Item("实践2").value)%> | <%=(edit_reco.Fields.Item("自学2").value)%> | <%=(edit_reco.Fields.Item("考试2").value)%> | <%=(edit_reco.Fields.Item("考核2").value)%> | <%=(edit_reco.Fields.Item("科目3").value)%> | <%=(edit_reco.Fields.Item("日期31").value)%> | - | <%=(edit_reco.Fields.Item("日期32").value)%> | | <%=(edit_reco.Fields.Item("理论3").value)%> | <%=(edit_reco.Fields.Item("实践3").value)%> | <%=(edit_reco.Fields.Item("自学3").value)%> | <%=(edit_reco.Fields.Item("考试3").value)%> | <%=(edit_reco.Fields.Item("考核3").value)%> | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 教学办单位意见: | | | <%=(edit_reco.Fields.Item("教学办意见").value)%> | | | 负责人签字: | <%=(edit_reco.Fields.Item("教学负责").value)%> | 盖 章 | | | <%=(edit_reco.Fields.Item("教学日期").value)%> | |
| 县青年农民科技培训工程办公室意见: | | | <%=(edit_reco.Fields.Item("县青意见").value)%> | | | 负责人签字: | <%=(edit_reco.Fields.Item("县青负责").value)%> | 盖 章 | | | <%=(edit_reco.Fields.Item("县青日期").value)%> | |
| 证书编号: | <%=(edit_reco.Fields.Item("证号编号").value)%> | 学前生产(经营)状况 | 学前生产(经营)状况 | <%=(edit_reco.Fields.Item("学前状况").value)%> | <%=(edit_reco.Fields.Item("学后状况").value)%> | | |
|
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 edit_reco.MoveNext() Wend %>
| 共<%=(edit_reco_total)%>条记录,本页显示第<%=(edit_reco_first)%>条到<%=(edit_reco_last)%>条! | <% If MM_offset <> 0 Then %> 第一条 <% End If ' end MM_offset <> 0 %> <% If MM_offset <> 0 Then %> 前一条 <% End If ' end MM_offset <> 0 %> <% If Not MM_atTotal Then %> 后一条 <% End If ' end Not MM_atTotal %> <% If Not MM_atTotal Then %> 末一条 <% End If ' end Not MM_atTotal %> | | |
<% edit_reco.Close() Set edit_reco = Nothing %>
编辑历史:[这消息被911again编辑过(编辑时间2003-06-09 16:46:07)] [这消息被911again编辑过(编辑时间2003-06-09 16:48:18)] [这消息被911again编辑过(编辑时间2003-06-09 16:58:21)] [这消息被911again编辑过(编辑时间2003-06-09 16:59:24)] [这消息被911again编辑过(编辑时间2003-06-09 17:18:06)] [这消息被911again编辑过(编辑时间2003-06-09 17:23:56)] [这消息被911again编辑过(编辑时间2003-06-09 17:26:00)] [这消息被911again编辑过(编辑时间2003-06-09 17:28:31)] [这消息被911again编辑过(编辑时间2003-06-09 23:11:08)] [这消息被911again编辑过(编辑时间2003-06-10 00:05:41)]
|
 I''MAD
职务:普通成员
等级:8
金币:11.0
发贴:9502
注册:2001/9/16 20:00:53
|
#22003/6/9 9:04:09
是动态数据不能显示还是FW切的图不能显示?在结果页上应用一个“当记录为空时不显示”服务器行为看看。
|
 911again
职务:普通成员
等级:1
金币:0.0
发贴:97
注册:2002/10/13 7:43:28
|
|
 I''MAD
职务:普通成员
等级:8
金币:11.0
发贴:9502
注册:2001/9/16 20:00:53
|
#42003/6/10 8:42:58
晕。。。你的SQL怎么写的啊? ORDER BY 学号,乡,村,组,姓名, 性别, 出生年月"???按时间排不是很好了么?
PS:你可以试着把页面的所有服务器行为都删掉,并且保证代码里也没有ASP代码了,再做简单的数据重复显示,如果没错,那就是你服务器行为太多有冲突,一样样来解决,我就是这样解决的。
|