ASP Method for unlimited classification 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 %>" // continent name ### country name |...
Menuidarr [1] = "Zhou"
Menuidarr [2] = "author"
Menuclass = 2 // Level 4 menu
Splitchar1 = "| ";
Splitchar2 = "###";

Basic menuarr [1] and menuarr [2] use class output
Options. Add (New Option ("----- select -----",""));
Add (New Option ("text", "value") Usage
The value generated by JS is the name in top1, some use ID, some use text, and modify sub top1 in combination with the feasibility of database select.

SQL = "select * From type2"
Rs. Open SQL, Conn, 1, 1
While not Rs. EOF
A = RS ("ID2 ")
B = RS ("p_type2 ")
Call top2 (A,)
Rs. movenext
Wend
Rs. Close
End sub

Sub top11

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
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.