ASP no refresh upload with Preview program code

Source: Internet
Author: User
Tags file upload
First of all I am using Al Ain asp no component upload class iframe. Input that is assigned to the parent window directly after uploading inside the frame. Here is the code for index.php.
But this one can upload a picture can not upload pictures in bulk!     Single File upload <br /> <iframe frameborder= "0"  height= " width="  name= "Upload"  src= "upload.asp" ></iframe><br /> <input id= "file"  /> <

Script> FUNCTION&NBSP;BACKFN (fname) { document.getelementbyid ("file"). Value=fname;

 document.getelementbyid ("Fimg"). src= "upload/" +fname;
} </script>      Then this is the ASP background to write the code of the picture! is an ASP's attention   <!--#include  file= "upload_class.asp"--> <% if lcase (Request. ServerVariables ("request_method") = "POST"  then dim upload set upload = new  Anupload upload. exe =  "Jpg|bmp|jpeg|gif|png" upload. maxsize = 2 * 1024 * 1024  ' 2M upload. GetData () if upload. errorid>0 then   response. WrIte upload. Description else  dim file,savpath  savepath =  "upload"  set file =  Upload.files ("File1")  if file.isfile then   result = file.savetofile ( savepath,0,true)   if result then    msg = file.filename    else    msg = file. Exception   end if  end if end if set upload = nothing%>  href= "Upload.asp" > re-upload </a> <script>window.parent.backfn.apply (this,["<%=msg%>"); </script> <%else%> <form action= "upload.asp"  method= "post"  enctype= "multipart/ Form-data " target=" Upload " id=" upfrm ">  files  <input type=" file " name=" File1 "  /> <input type= "Submit"  value= "upload"  /><br /> </form> <%end  if%>



As for this upload_class.asp file, everyone will go online to find it! This is the image of the effect after the upload
No upload pictures before


After uploading the pictures

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.