Index.asp Tutorial Upload Demo
Img_class.asp the class that gets the height and width of the picture
oupload.asp Upload Processing
Conn.asp This is not for me. Connecting to the Database tutorial.
Upload_class.asp using al-No Component upload class
Can be set by oupload.asp to upload file type, size, whether to open the build thumbnail,
The default is open. But for your space support: AspJpeg components. Now the space is basically supported.
<!--#include file= "conn.asp"-->
<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> Pictures Bulk Upload </title>
<script language= "Web Effects" type= "Text/javascript" >
Insert List
function Addurl () {
var thisurl= "Address" + (document.myform.dourl.length+1) + "|http://";
var url=prompt ("Please enter the address name and link, middle with" | " Separated ", thisurl);
if (url!=null&&url!= "") {
Document.myform.dourl.options[document.myform.dourl.length]=new option (Url,url);
}
}
function Modifyurl () {
if (document.myform.dourl.length==0) {
return false;
}
var Thisurl=document.myform.dourl.value;
if (thisurl== "") {
Alert ("Please select an address first, then click Modify Button!") ");
return false;
}
var url=prompt ("Please enter the address name and link, middle with" | " Separated ", thisurl);
if (url!=thisurl&&url!=null&&url!= "") {
Document.myform.dourl.options[document.myform.dourl.selectedindex]=new option (Url,url);
}
}
function Delurl () {
if (document.myform.dourl.length==0) {
return false;
}
var Thisurl=document.myform.dourl.value;
if (thisurl== "") {
Alert ("Please select an address first, then click the Delete button!") ");
return false;
}
Document.myform.dourl.options[document.myform.dourl.selectedindex]=null;
}
Center pop-up form
function GetWindow (url,width,height) {
window.open (URL, ', ' width= ' +width+ ', height= ' +height+ ', top= ' + (screen.height-height)/2+ ', left= ' + ( Screen.width-width)/2);
}
function Upcon (URL) {
if (url!=null&&url!= "") {
Document.myform.dourl.options[document.myform.dourl.length]=new option (Url,url);
}
}
function F_show () {
var value = "";
For (var m=0 m <document.myform.dourl.options.length; m++) {
if (value== "")
value = Document.myform.dourl.options[m].value;
Else
Value = value+ "$" +document.myform.dourl.options[m].value;
}
Document.myform.imglist.value=value;
}
</script>
<style type= "Text/css Tutorial" >
html,body{margin:0;padding:0;height:100.1%;}
Body{font-family:tahoma,arial, Helvetica, Sans-serif;font-size:12px;color: #666; text-align:center;}
form{margin:0;padding:0;}
button,input,textarea,select{margin-right:5px;border:1px solid #777; font-size:12px;}
. checkbox{margin-bottom:-1px;margin-right:0px;border:0px;}
button,input{padding-top:4px;padding-bottom:2px;}
. bt2{padding:4px 15px 2px;margin:5px;height:20px;font-weight:bold;background: #fff;}
</style>
<body>
<%
Dim oaction
Oaction = Trim (Request ("Oaction"))
Select Case Oaction
Case "Myshow"
Call Myshow ()
Case "Mysave"
Call Mysave ()
Case Else
Call Myshow ()
End Select
Sub Myshow ()
%>
<form action= "Index.asp?oaction=mysave" method= "post" name= "MyForm" >
<br><br>
<select name= "Dourl" id= "Dourl" size= "5" ondblclick= "return Modifyurl ();" Multiple style= "width:405px;" >
</select>
<li>
<input type= "button" class= "BT2" value= "Upload" onclick= "GetWindow (' Oupload.asp?ouploadtype=pic&formname=myform &forminput=dourl ', 350,60); " >
<input type= "button" class= "BT2" value= "Add" onclick= "Addurl ();" >
<input type= "button" class= "BT2" value= "Modify" onclick= "return Modifyurl ();" >
<input type= "button" class= "BT2" value= "delete" onclick= "Delurl ();" >
</li>
<li><input type= "hidden" name= "imglist" value= "" ><input name= "Submission" type= "submit" value= "submitted" onclick = "F_show ()"/></li>
</form>
<%
End Sub
Sub Mysave ()
ImageUrl = Trim (Request.Form ("Imglist"))
If ImageUrl = "" or IsNull (ImageUrl) Then
Gostr "Picture cannot be empty!"
Else
Conn.execute ("INSERT into piclist (piccontent) VALUES (' &imageurl& ')")
Goalert "Add multiple images Upload success!", "index.asp"
End If
End Sub
%>
</body>