账号通
    

账号  

密码  

2315

查看

4

回复
主题:[建议]7.0中商品中归属栏目。能否改成多级联动 这样很方便 [收藏主题] 转到:  
keefegu 当前离线

140

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:450 分
登录次数:116 次
注册时间:2010/7/6
最后登录:2011/3/24
keefegu 发表于:2010/8/28 20:06:00   | 显示全部帖子 查看该作者主题 楼主 
科汛智能建站系统
向我们的分类一般是3级。每个分类里的小分类都很多。尤其是第3级分类。内容很多相似的。 所以的在添加商品的时候,经常弄错弄混。如果否改成多级联动 这样很方便!分类一目了然。



下面是我原来的程序 后台代码 :



<script language = "JavaScript">

var onecount;

var threecount;

onecount=0;

threecount=0

subcat3=new Array();

<%

count = 0

do while not rs2.eof

%>

subcat3[<%=count%>] = new Array("<%= trim(rs2("ssname"))%>","<%= rs2("scid")%>","<%= rs2("ssid")%>");

<%

count = count + 1

rs2.movenext

loop

rs2.close

%>

threecount=<%=count%>;

subcat = new Array();

<%

count = 0

do while not rs.eof

%>

subcat[<%=count%>] = new Array("<%= trim(rs("scname"))%>","<%= rs("bcid")%>","<%= rs("scid")%>");

<%

count = count + 1

rs.movenext

loop

rs.close

%>

onecount=<%=count%>;

function changelocation(locationid)

    {

    document.myform.scid.length = 0;

    var locationid=locationid;

    var i;

    for (i=0;i < onecount; i++)

        {

            if (subcat[i][1] == locationid)

            {

             document.myform.scid.options[document.myform.scid.length] = new Option(subcat[i][0], subcat[i][2]);

            }        

        }

     changelocation3(document.myform.scid.options[document.myform.scid.selectedIndex].value)

    }

function changelocation3(locationid)

    {

    document.myform.ssid.length = 0;

    var locationid=locationid;

    var i;

    for (i=0;i < threecount; i++)

        {

            if (subcat3[i][1] == locationid)

            {

             document.myform.ssid.options[document.myform.ssid.length] = new Option(subcat3[i][0], subcat3[i][2]);

            }

        }

    }

//-->

</script>

-----------------------------

大类:

              <%

rs.open "select * from bigclass order by paixu",conn,1,1

if rs.eof and rs.bof then

response.write "请先添加分类"

response.end

else

%>

              <select name="bcid" size="1" id="select2">

                <option selected value="<%=trim(rs("bcid"))%>"><%=trim(rs("bcname"))%></option>

                <%      dim selclass

         selclass=rs("bcid")

        rs.movenext

        do while not rs.eof

%>

                <option value="<%=trim(rs("bcid"))%>"><%=trim(rs("bcname"))%></option>

                <%

    rs.movenext

        loop

end if

        rs.close

%>

              </select>

              小类:

              <select name="scid" size="1" id="scid">

                <%

rs.open "select * from smallclass where bcid="&selclass,conn,1,1

if not(rs.eof and rs.bof) then

dim selclass3

selclass3=rs("scid")

do while not rs.eof

%>

<option value="<%=trim(rs("scid"))%>"><%=trim(rs("scname"))%></option>

<% rs.movenext

loop

end if

rs.close

set rs = nothing

%>

              </select>

              子类:

              <select name="ssid">

                <%

rs2.open "select * from ssclass where scid="&selclass3,conn,1,1

if not(rs2.eof and rs2.bof) then

do while not rs2.eof%>

                <option value="<%=rs2("ssid")%>"<%if ssid=rs2("ssid") then %> selected <%end if%> ><%=rs2("ssname")%></option>

                <%

rs2.movenext

loop

end if

rs2.close

set rs2= nothing

%>

              </select>

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
keefegu 当前离线

140

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:450 分
登录次数:116 次
注册时间:2010/7/6
最后登录:2011/3/24
keefegu 发表于:2010/8/30 8:52:00   | 显示全部帖子 查看该作者主题 沙发 
科汛智能建站系统
晕 了。 我是说分类。改成多级联动的。  模型那里是自定义字段改成多级联动
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
keefegu 当前离线

140

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:450 分
登录次数:116 次
注册时间:2010/7/6
最后登录:2011/3/24
keefegu 发表于:2010/8/30 8:52:00   | 显示全部帖子 查看该作者主题 藤椅 
科汛在线商城系统(NET)
并且还只有1级。无法实现多级吧
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.14063秒 powered by KesionCMS 9.0