The method of realizing infinite level classification by ASP _asp Base of JS Edition

Source: Internet
Author: User
Menuarr=new Array ()
Menulenarr=new Array ()
Submenuarr=new Array ()
Menuidarr=new Array ()
menuarr[1]= "<%call top11%>"//Continent name | | | ...
menuarr[2]= "<%call top1%>"//Zhou Name # # #国名 | | ...
Menuidarr[1]= "Zhou"
menuidarr[2]= "Author"
menuclass=2//Level 4 menu
splitchar1= "| | |";
Splitchar2= "###";

Basic menuarr[1] and menuarr[2] with class output
Options.add ("-----Please select-----", ""));
Add (New Option ("text", "value") usage
JS generated value is the name in the TOP1, some with the ID, some with text, in conjunction with the feasibility of the database select the principle of modification
sub Top1

sql= ' select * from type2 '
Rs.Open sql,conn,1,1
While not rs.eof
A=r S ("Id2")
B=rs ("p_type2")
Call TOP2 (a,a)
Rs.movenext
Wend
rs.close
End Sub

Sub to P11

sql= ' select * from type2 '
Rs.Open sql,conn,1,1
While not rs.eof
Response.Write (rs ("P_type2" ) & "| | |")
Rs.movenext
Wend
rs.close
End Sub
Sub Top2 (id,b)
sqle= ' select DISTINCT (author) from product where id2= "&id
Set Rsa=server. CreateObject ("Adodb.recordset")
Rsa.open sqle,conn,1,1
If not (rsa.eof) then
while not rsa.eof  & nbsp; 
Response.Write (b& "###")
Response.Write RSA ("author") & "| | |"
Rsa.movenext
Wend
Else
Response.Write (b& "###")
Response.Write "None" & "| | |"
End If
rsa.close
End Sub

%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.