问题解决,请虫子过来接分(1)

gengxl 2004-07-31 02:27:11
虫子请进。
...全文
138 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
bbcbs 2004-07-31
  • 打赏
  • 举报
回复
代码:太多了贴不完,抽取其中一部分。。

sub ShowSearch(ShowType)
dim count
if ShowType<>1 and ShowType<>2 then
ShowType=1
end if
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass order by SmallClassID desc"
rs.open sql,conn,1,1

set rsbig=server.createobject("adodb.recordset")
sqlbig = "select * from bigClass order by bigClassID desc"
rsbig.open sqlbig,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;

function changelocation(locationid)
{
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}

var onecountt;
subcatbig = new Array();
<%
countt = 0
do while not rsbig.eof
%>
subcatbig[<%=countt%>] = new Array("<%= trim(rsbig("bigClassName"))%>","<%= trim(rsbig("BigbigClassName"))%>","<%= trim(rsbig("bigClassName"))%>");
<%
countt = countt + 1
rsbig.movenext
loop
rsbig.close
%>
onecountt=<%=countt%>;

function changelocationn(locationidd)
{
document.myform.BigClassName.length = 1;
var locationidd=locationidd;
var y;
for (y=0;y < onecountt; y++)
{
if (subcatbig[y][1] == locationidd)
{
document.myform.BigClassName.options[document.myform.BigClassName.length] = new Option(subcatbig[y][0], subcatbig[y][2]);
}
}
}

</script>


<table border="0" cellpadding="2" cellspacing="0" align="center">
<form method="Get" name="myform" action="search.asp">
<tr>
<td height="28">
<select name="Field" size="1">
<option value="Title" selected>Products name</option>
<option value="Content">Products content</option>
</select>
<%if ShowType=1 then%>
</td>
</tr>
<tr>
<td height="14">
<%end if%>
<select name="BigBigClassName" onChange="changelocationn(document.myform.BigBigClassName.options[document.myform.BigBigClassName.selectedIndex].value)" size="1">
<option selected value="">BigBigclass</option>
<%
if not (rsBigBigClass.bof and rsBigBigClass.eof) then
rsBigBigClass.movefirst
do while not rsBigBigClass.eof
response.Write "<option value='" & trim(rsBigBigClass("BigBigClassName")) & "'>" & trim(rsBigBigClass("BigBigClassName")) & "</option>"
rsBigBigClass.movenext
loop
end if
tsqlBigClass="select * from BigClass where BigBigClassName='"&BigBigClassName&"'"
Set trsBigClass= Server.CreateObject("ADODB.Recordset")
trsBigClass.open tsqlBigClass,conn,1,1

%>
</select>
</td>
</tr>
<tr>
<td height="14">
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<option selected value="">Bigclass</option>
</select>
<%if ShowType=1 then%>
</td>
</tr>
<tr>
<td height="28">
<%end if%>
<select name="SmallClassName">
<option selected value="">Smallclass</option>
</select>
<%if ShowType=1 then%>
</td>
</tr>
<tr>
<td height="28">
<%end if%>
<input type="text" name="keyword" size=15 value="Keyword" maxlength="50" onFocus="this.select();">
<input type="submit" name="Submit" value="Go">
</td>
</tr>
</form>
</table>
<%
end sub
%>
此段内为三级联动
bbcbs 2004-07-31
  • 打赏
  • 举报
回复
问题网站 http://www.maxwill.com/default.asp (所有问题已解决)
问题所在:产品导航问题。
需要:联动下拉菜单,产品菜单目录树,产品线购,邮发,产品类别导航明确化。。。。。等

已解决
xiaowenand 2004-07-31
  • 打赏
  • 举报
回复
up
chang1216 2004-07-31
  • 打赏
  • 举报
回复
小心被封
xinyu1225 2004-07-31
  • 打赏
  • 举报
回复
楼主把问题贴出来,虫子怎么帮你搞定的大致也搞出来,让我们心里也踏实,你说是不?
痛恨倒分,相信楼主不是这样的人,别让大家失望!
bbcbs 2004-07-31
  • 打赏
  • 举报
回复
看看我们的IP吧,一个在大连,一个在青岛,中间有个渤海~
一个在公司,一个是SOHO~~
不过同样的是做WEB开发的,有难就帮,兄弟够味,帮了就要给分。。
唉~~
wsdzmhongm 2004-07-31
  • 打赏
  • 举报
回复
嘿嘿,经常看到这样的贴子
bbcbs 2004-07-31
  • 打赏
  • 举报
回复
先别结贴!!!
我来声明一下。。。。

这个贴我早就看到了,都不敢回。。。现在不回不行了,,,我们真的不是倒分!~~~
aspczlover 2004-07-31
  • 打赏
  • 举报
回复
是啊 小心
不是第一次了啊你
gengxl 2004-07-31
  • 打赏
  • 举报
回复
斑竹明鉴啊 小的可不是倒分的,代码一会贴出来
gengxl 2004-07-31
  • 打赏
  • 举报
回复
不是吧?
colinliu 2004-07-31
  • 打赏
  • 举报
回复
呵呵,順便分點吧?。。。。
angelheavens 2004-07-31
  • 打赏
  • 举报
回复
小心封ID

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧