| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1073 人关注过本帖
标题:[求助]如何解决asp分页滚动图片不显示问题????
只看楼主 加入收藏
xskleh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-3-10
收藏
 问题点数:0 回复次数:6 
[求助]如何解决asp分页滚动图片不显示问题????
有哪位好心人帮我看一下啊,我刚学ASP不怎么会,看看www.qfgglp.com的首页,首页一个分页的,左侧下边有一个滚动的图片,是调的数据库,但是到了第二个分页的时候就不显示了,谁能帮我看一下啊?????
我在线等!!!!

[此贴子已经被作者于2007-3-10 11:13:54编辑过]

搜索更多相关主题的帖子: asp 滚动 
2007-03-10 11:09
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1376
注 册:2005-3-14
收藏
得分:0 

没代码好像看不出是什么问题


http://toorup.3v.do
loading...
2007-03-10 11:13
xskleh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-3-10
收藏
得分:0 

<!--#include file="conn.asp" -->
<!--#include file="intop.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#Layer1 {
position:absolute;
left:183px;
top:3px;
width:587px;
height:432px;
z-index:1;
}
-->
</style>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="180" valign="top"><table width="180" height="132" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td><TABLE cellSpacing=0 cellPadding=0 width="180" border=0>
<TBODY>
<TR>
<TD height=435 valign="top" bgColor=#e8f1f8><!--#include file="lege.asp" -->
</TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table></td>
<td width="590" valign="top"><div>
<TABLE width="580" height="346"
border=0 align="right" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD height=25 valign="top" bgcolor="#f9f9f9"><%
set rs=server.createobject("ADODB.Recordset")
sql="select * from P_class "
classType = request("classType")
key = request("p_type")
if classType <> "" then
sql = sql & " and p_type = '"&classType&"'"
end if
if key <> "" then
sql = sql & " and (p_name like '%"&key&"%' or p_spec like '%"&key&"%') "
end if

sql = sql & " order by p_id asc"
rs.open sql,conn,1,1

if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if

%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="4%" align="center" valign="top"><div align="left"><img src="tu/n.jpg" width="35" height="28"></div></td>
<td width="96%" class=db align="left" valign="middle" background="tu/na.jpg"><STRONG><FONT
color=#ffffff>您现在的位置是:首页 &gt;&gt;共<%=rs.recordcount%>个产品分类&gt;&gt;本页为第<%=pagecount%>页</FONT></STRONG></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table3">
<%
sql_type="select * from P_class ORDER BY p_id asc"
set rs_type=server.createobject("adodb.recordset")
rs_type.open sql_type,conn,0,1
%>
<tr>
<%
if rs_type.eof and rs_type.bof then

else

for i=1 to rs_type.recordcount
if rs_type.EOF then exit for

%>
<td height="25" align="center" class="line"><a href="Demo_Product.asp?classtype=<%=rs_type("p_type")%>&smallclass=<%=rs_type("p_type")%>" class="six"><%=rs_type("p_type")%></a></td>
<% if i mod 6 = 0 then %>
</tr>
<tr>
<%end if%>
<%
rs_type.movenext
next
end if
rs_type.close
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="n2">
<%
if rs.eof or rs.bof then
response.write("对不起没有你查询的记录")
else
rs.pagesize=18
%>
<tr>
<%
rs.AbsolutePage=pagecount

for i=1 to rs.recordcount
if rs.EOF then exit for
%>
<td align="center" bgcolor="#f9f9f9" class="line"><table width="142" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="146" height="129" align="center" valign="middle" background="tu/11.gif"><a href="Demo_ProDuct.asp?classtype=<%=rs("p_type")%>"><img src="<%=rs("p_type_i")%>" width="132" height="119" border="0"></a></td>
</tr>
<tr>
<td height="45" align="center" valign="top" class="n2"><div align="center">名称:<A href="Demo_ProDuct.asp?classtype=<%=rs("p_type")%>" class="money"><%=rs("p_type")%><br>
点击进入</A><br>
</div></td>
</tr>
</table></td>
<% if i mod 3 = 0 then %>
</tr>
<tr>
<%end if%>
<%
rs.movenext
if i>=rs.pagesize then exit for
next
end if
%>
</table>
<table width="100%" height="20">
<tr bgcolor="#FFFFFF">
<td height="1" align="center" bgcolor="#f9f9f9"><img src="tu/xx.jpg" width="520" height="1"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="16" align="center" bgcolor="#f9f9f9"><span class="n2">页次: <b><font color=red><%=pagecount%></font>/<%=rs.pagecount%></b></span> <a href="?classType=<%=classType%>" class="number"><font color="#000000">首页</font></a>
<% if pagecount=1 and rs.pagecount<>pagecount and rs.pagecount<>0 then%>
<a href="?page=<%=cstr(pagecount+1)%>" class="number"><font color="#000000">下一页</font></a>
<% end if %>
<% if rs.pagecount>1 and rs.pagecount=pagecount then %>
<a href="?page=<%=cstr(pagecount-1)%>" class="number"><font color="#000000">上一页</font></a>
<%end if%>
<% if pagecount<>1 and rs.pagecount<>pagecount then%>
<a href="?page=<%=cstr(pagecount-1)%>" class="number"><font color="#000000">上一页</font></a> <a href="?page=<%=cstr(pagecount+1)%>" class="number"><font color="#000000">下一页</font></a>
<%end if%>
<% if rs.pagecount >0 then%>
<a href="?page=<%=rs.pagecount%>" class="number"><font color="#000000">尾页</font></a>
<% else%>
<span class="font3">尾页</span>
<% end if%>
<select name="page" onChange="location=this.options[this.selectedIndex].value" >
<%
for i=1 to rs.pagecount
%>
<option value="?page=<%=i%>" <% if pagecount = i then response.Write("selected")%>>&#31532;<%=i%>&#39029;</option>
<%
next
%>
</select></td>
</tr>
</table></td>
</tr>
</table>
<%
rs.close
set rs=nothing
%>
</TD>
</TR>
</TABLE>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="17,62,81,114" href="Demo_wh.asp">
<area shape="rect" coords="40,126,112,167" href="Demo_zc.asp">
<area shape="rect" coords="21,187,91,220" href="Demo_Order.asp">
<area shape="rect" coords="30,242,100,278" href="Demo_Guest.asp">
</map>
</body><!--#include file="infoot.asp" -->
</html>


2007-03-10 11:14
xskleh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-3-10
收藏
得分:0 
这个是整个页的代码

2007-03-10 11:14
xskleh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-3-10
收藏
得分:0 

<TABLE width="180"
border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD><img src="tu/l.jpg" width="180" height="25"></TD>
</TR>
<tr>
<TD bgColor=#0BBAFD height=2></TD>
</tr>
<tr>
<TD><TABLE borderColor=#111111 cellSpacing=0 cellPadding=2 width="100%" border=0>
<tr>
<TD width=100% height="16" valign="middle"><script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
<!--
function ToggleDisplay(oButton, oItems){
if ((oItems.style.display == "") || (oItems.style.display == "block")) {
oItems.style.display = "none";
oButton.src = "/images/tree_plus.gif";
}
else {
oItems.style.display = "block";
oButton.src = "/images/tree_minus.gif";
}
return false;
}
function UnFoldAll() {
temp = document.all.length;
for(i=0;i<temp;i++)
if(document.all[i].id.substr(0,3) =="Img")
document.all[i].src = "/images/tree_minus.gif"
else if(document.all[i].id.substr(0,4) =="Tree")
document.all[i].style.display ="block"
}
function FoldAll() {
temp = document.all.length;
for(i=0;i<temp;i++)
if(document.all[i].id.substr(0,3) =="Img")
document.all[i].src = "/images/tree_plus.gif"
else if(document.all[i].id.substr(0,4) =="Tree")
document.all[i].style.display ="none"
}
//-->
</SCRIPT>
<%
sql = "SELECT * FROM P_class ORDER BY p_id"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,0,1
if rs.eof and rs.bof then
Response.Write"还没有分类"
else
do while not rs.eof

sql = "SELECT * FROM P_class_small where p_type ='"&rs("p_type")&"'"
Set rs2 = Server.CreateObject("ADODB.Recordset")
rs2.OPEN sql,Conn,1,1
if rs2.recordcount > 0 then
Response.Write"&nbsp;&nbsp;<A border=0 style='CURSOR: hand' id=Img"&rs("p_id")&" onclick=ToggleDisplay(Img"&rs("p_id")&",Tree"&rs("p_id")&")><img src='index/1.gif' width='20' height='19' border=0><img src='index/folder_close.gif' width='20' height='19' border=0>&nbsp;"&rs("p_type")&"</a>"
else
Response.Write"&nbsp;&nbsp;<A href=Demo_Product.asp?classtype="&rs("p_type")&"><img src='index/1.gif' width='20' height='19' border=0><img src='index/folder_close.gif' width='20' height='19' border=0>&nbsp;"&rs("p_type")&"</a>"
end if
counts=conn.execute("Select count(*) from P_info where p_other = 0 and p_type='"&rs("p_type")&"'")(0)
Response.Write"(<FONT COLOR='800000'>"&counts&"</FONT>)<br>"
%>
</td>
</tr>
<tr>
<td><div id=Tree<%=rs("p_id")%>>
<%
do while not rs2.eof
%>
<%
rs2.movenext
loop
rs2.close
Set rs2=Nothing
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
</table>
</div>
<%
rs.movenext
loop
end if
rs.close
Set rs=Nothing
%>
<SCRIPT language=javascript>FoldAll();</SCRIPT>
</td>
</tr>
</table></TD>
</tr>
<tr>
<TD height="10"></TD>
</tr>
<TR>
<TD height=3><img src="tu/r.jpg" width="180" height="25"></TD>
</TR>
<tr>
<TD bgColor=#0BBAFD height=2></TD>
</tr>
<TR>
<TD><DIV id=rolllink
style="OVERFLOW: hidden; WIDTH: 100%; HEIGHT: 190px">
<DIV id=rolllink1>
<TABLE width="98%"
border=0 cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD valign="top"><%
set rs=server.createobject("ADODB.Recordset")
sql="select * from P_class "
classType = request("classType")
key = request("p_type")
if classType <> "" then
sql = sql & " and p_type = '"&classType&"'"
end if
if key <> "" then
sql = sql & " and (p_name like '%"&key&"%' or p_spec like '%"&key&"%') "
end if

sql = sql & " order by p_id asc"
rs.open sql,conn,1,1

if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if

%>
<table width="180" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><table width="100" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table3">
<%
if rs.eof or rs.bof then
response.write("对不起没有你查询的记录")
else
rs.pagesize=50
%>
<tr>
<%
rs.AbsolutePage=pagecount

for i=1 to rs.recordcount
if rs.EOF then exit for
%>
<td align="center" class="n2"><table width="155" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8F1F8">
<tr>
<td width="180" height="131" align="center" valign="middle" background="tu/112.gif"><a href="Demo_ProDuct.asp?classtype=<%=rs("p_type")%>"><img src="<%=rs("p_type_i")%>" width="138" height="111" border="0"></a></td>
</tr>
<tr>
<td height="31" align="center" class="n2"><div align="center"><A href="Demo_ProDuct.asp?classtype=<%=rs("p_type")%>" class="money"><%=rs("p_type")%><br>
点击进入</A><br>
</div></td>
</tr>
</table></td>
<% if i mod 1 = 0 then %>
</tr>
<tr>
<%end if%>
<%
rs.movenext
if i>=rs.pagesize then exit for
next
end if
%>
</table></td>
</tr>
</table>
<%
rs.close
set rs=nothing
%></TD>
</TR>
</TABLE>
</DIV>
<DIV id=rolllink2></DIV>
</DIV>
<script language="">
var rollspeed=5
rolllink2.innerHTML=rolllink1.innerHTML //克隆rolllink1为rolllink2
function Marquee(){
if(rolllink2.offsetTop-rolllink.scrollTop<=0) //当滚动至rolllink1与rolllink2交界时
rolllink.scrollTop-=rolllink1.offsetHeight //rolllink跳到最顶端
else{
rolllink.scrollTop++
}
}
var MyMar=setInterval(Marquee,rollspeed) //设置定时器
rolllink.onmouseover=function() {clearInterval(MyMar)}//鼠标移上时清除定时器达到滚动停止的目的
rolllink.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}//鼠标移开时重设定时器
</script></TD>
</TR>
</TBODY>
</TABLE>

这个是左侧的代码


2007-03-10 11:21
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1215
专家分:1376
注 册:2005-3-14
收藏
得分:0 

你的Demo_Promduc.asp和你主页一样效果,
作不存在主页INDEX.ASP这种问题,
你对比看一下了.


http://toorup.3v.do
loading...
2007-03-10 11:51
xskleh
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-3-10
收藏
得分:0 

我的Demo_Promduc.asp的左下边是解态的,没有调数据库,首页是调的数据库啊


2007-03-10 14:06
快速回复:[求助]如何解决asp分页滚动图片不显示问题????
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012417 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved