ASP mimics Lotus Notes interface program

Source: Internet
Author: User
Tags date key string connect
Procedure "%
' Lotus Notes Interface program
' Author: the Northern Snow
' Creation Date: March 2002
' Modification Date: March 2005
' For the convenience of security and sharing, the markup of the ASP program is changed to Chinese characters, which can be replaced in bulk when used
%〉

<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style>
. Theader{font-weight:bold;background-color: #D0D0D0; color: #000000; Border-left:

1 solid #FFFFFF; Border-right:1 solid #000000; Border-top:1 solid #FFFFFF;

Border-bottom:1 Solid #000000}
. Theaderpush{font-weight:bold;background-color: #D0D0D0; color: #000000; border:1

Solid #707070;}
</style>
<title> imitate Lotus Notes effects </title>
<script language=javascript>
var yesh= "√"; Flag displayed when selected
var noh= '; Show someone when they are not selected
var ifpush= ' no '; Move the mouse when selected to control, ' yes ' means the mouse has been pressed, drag a

effect; ' No ' means that the mouse is already Thai, then moving the mouse has no effect

var fi= ' yes '; Move the mouse when selected to control, ' yes ' to handle the current cell, ' no '

is not processed
The default is ' Yes ', and when we go into a range of cells, we process him and then change to

' No ', then no longer
Handles the cell, and when you leave the cell, it is changed to ' yes ', and you can handle the next

A cell to enter

Performing Data deletion
function Delinfo (icount)
{
var pkey=new String ();
if (icount>0)
{
for (Var i=1;i<=icount;i++)
{
if (document.getElementById ("a" + i). Innertext==yesh)
{Pkey + = ("" + document.getElementById ("Pkey" + i). Value + "',")}
The key string is generated here, and because it is a character, a single quote is added to each keyword.
Then connect with a comma, and if it is a numeric type, do not use single quotes.
}
}
if (pkey!= "")
{
Pkey=pkey.substring (0,pkey.length-1);
if (confirm) are you sure you want to delete the selected information? "))
{
document.getElementById ("Delpkey"). Value=pkey;
document.getElementById ("Delform"). Submit ();
}
}
}

Performs data modifications, regardless of how many are selected, but only the first one is modified
function Editinfo (icount)
{
var pkey=new String ();
if (icount>0)
{
for (Var i=1;i<=icount;i++)
{
if (document.getElementById ("a" + i). Innertext==yesh)
{Pkey + = document.getElementById ("Pkey" + i). Value;
break;
}
}
if (pkey!= "")
{
window.open ("editinfo.asp?unid=" + pkey, "_blank");
Here you go to the boundary interface and edit the selected information. Editinto.asp code is not written.
}
}

Function MD ()
{ifpush= ' yes ';}

function Mu ()
{ifpush= ' no ';}

Drag selection
function Wr (WHOTD)
{
if (ifpush== ' yes ')
{
if (fi== ' yes ')
{fi= ' no ';
if (Whotd.innertext!=noh)
{Whotd.innertext=noh;}
Else
{Whotd.innertext=yesh;}
}
}
}

Click to select
function Wrone (WHOTD)
{
if (Whotd.innertext!=noh)
{Whotd.innertext=noh;}
Else
{Whotd.innertext=yesh;}
}
</script>

《%
' Connect to the database
Set db=server.createobject ("ADODB. Connection ")
Dim DBPath
DBPath = Server.MapPath ("Crc\configinfo\dispatch.mdb")
Dim mmm
mmm= "Driver={microsoft Access driver (*.mdb)};d bq=" & DBPath
Db. Open mmm

' Perform delete
If Request ("Delpkey") <> "then
Response.Write "del:" & Request ("Delpkey")
Response.Redirect request.servervariables ("Path_info")
' The code here is redundant, but you can avoid refreshing hints. Free to design programs as needed
End If

' Read data
Set Rs=server.createobject ("ADODB. Recordset ")
Rs. Open "SELECT * from Notes", db,3

%〉
<body onmousedown= "MD ()," onmouseup= "Mu ();" oncontextmenu= "return False"

Ondragstart= ' return false ' onselectstart= ' return false ' >
<br><br><br><div align=center>
<table border= "1" rules=none frame=hsides cellspacing=0 cellpadding=0 width= "90%" >
<tr>
&LT;TD width= "4%" bgcolor= "#FFFFFF" style= "Cursor:hand" >



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.