Amber unlimited classification linkage menu AJAX Edition

Source: Internet
Author: User

After I made the amber infinitus classification linkage menu Javascript edition, I made a presentation on the blue ideal and CSDN. Meihua xuexiong raised the issue of inefficiency on CSDN, I also realized this. I planned to complete the project after it was completed. However, I found some information on the Internet and finally made an infinitely classified Association menu for this AJAX version. Due to the rush of time, it was rough, but AJAX technology had been used to achieve unlimited linkage. Later, the version was improved.
I hope to provide you with some help. If you have good suggestions or bugs, you can reply to or browse http://www.51ajax.com/bbs/.
Running Environment: ms ie 6.0 FireFox 1.0.1
: Click here
Online Demo: click here
Bug feedback: click here
Last Updated:
There are two files in total:
The code for the ajax.html file is as follows:
<Html> <pead> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"> <meta content = "Amber [hopesoft], [url] http://www.10090.com [/url] "name =" author "> <title> www.net.cn-unlimited linkage menu [AJAX] </title> <style type =" text/css"> body, td {font-family:; font-size: 12px ;}</style> </form> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
The code for the ajax_server.asp file is as follows:
<% @ Language = "JavaScript" %> <% function OpenDB (sdbname) {/** --------------- OpenDB (sdbname) --------------- * OpenDB (sdbname) * function: Open the database sdbname, returns the conn object. * parameter: sdbname, String, database name. * instance: var conn = OpenDB ("database. mdb "); * --------------- OpenDB (sdbname) --------------- */var connstr =" Provider = Microsoft. jet. OLEDB.4.0; Data Source = "+ Server. mapPath (sdbname); var conn = Server. createObject ("ADOD B. connection "); conn. open (connstr); return conn;} var oConn = OpenDB ("ajax_data.mdb"); var sel = Request ("sel"); var classid = Request ("classid ") var fieldname = Request ("fieldname") var arrResult = new Array (); // var SQL = "select" + fieldname + "from Demo where parentid = '" + sel + "' and classid =" + classid; var SQL = "select id, "+ fieldname +" from Demo where parentid = '"+ sel +"' "; // Response. write ("alert ("+ SQL +") ") var rs = Server. CreateObject (" ADODB. Recordset "); rs. Open (SQL, oConn, 1, 1); while (! Rs. EOF) {// traverse all suitable data into the arrResult array. arrResult [arrResult. length] = rs (0 ). value + "|" + rs (1 ). value; rs. moveNext ();} // escape solves XMLHTTP. Chinese processing problems. // arrays are combined into strings. By "," string connection. Response. Write (escape (arrResult. join (","); %>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. style. cursor = 'hand'; this. alt = 'click here to open new window \ nCTRL + Mouse wheel to zoom in/out';} "onclick =" if (! This. resized) {return true;} else {window. open ('/upload/2006111610308411.jpg');} "alt =" "src =" http://www.bkjia.com/uploads/allimg/131016/22551K041-0.jpg "onload =" if (this. width> screen. width * 0.7) {this. resized = true; this. width = screen. width * 0.7; this. alt = 'click here to open new window \ nCTRL + Mouse wheel to zoom in/out';} "border = 0>

The above two versions of the program combine the wisdom of many netizens. As shown by my hand, the original intention and essence of the Internet lies in sharing. May this mini-program bring you some convenience.

Related Article

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.