The submission of tree-type structure in ASP programming

Source: Internet
Author: User
Demo: http://asp2004.net/temp/treemenu/favorite.asp
<% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
<!--#include file= "conn.asp"-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> Network Bookmarks </title>
<body>
<%
Action=request. QueryString ("Action")
If action= "Save" Then
Dim A (10)
A (0) =0
Tt=request. Form ("TT")
T=split (TT,CHR (13))
For i=0 to UBound (t)-1
S=split (t (i), Chr (9))
Conn.execute ("INSERT INTO Menu" (Id1,menuname,url) VALUES ("&a" (s (0)-1) & "," "&s (1) &" ', ' "&s (2) & "')")
if s (2) = "" Then
Set Rs=conn.execute ("SELECT top 1 ID as TP from menu desc")
A (s (0)) =rs ("TP")
End If
Next
Response. Redirect ("index.asp")
Else
%>
First, set the Internet security zone to the bottom. <br>
By pressing the load button, you may be prompted that "an ActiveX control on this page may not be secure with the rest of the page." Do you want to allow this interaction? ”
Select Yes to load the contents of the favorites. Then press the submit button to save the Favorites folder.
<script language= "JavaScript" >
var s;
S= "";
function Showfolderfilelist (I,FOLDERSPEC)
{
var fso,f,fc,name;
var url,str,file,filename;
var i;
FSO = new ActiveXObject ("Scripting.FileSystemObject");
f = fso. GetFolder (FOLDERSPEC);
S + + i++ + "" + F.name + "";
FC = new Enumerator (f.files);
for (;!fc.atend (); Fc.movenext ())
{
filename = fso. GetFileName (Fc.item ());
if (Filename.indexof (". url") >=0)
{
filename = filename.substring (0, filename.length-4);

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.