473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to upload image from client side by using link we can download it?

Expand|Select|Wrap|Line Numbers
  1.  function UploadImage() 
  2. {
  3.     var imgRe = /^.+\.(jpg|jpeg|gif|png|bmp|tif|JPG|JPEG|GIF|PNG|BMP|TIF)$/i;
  4.     document.getElementById("file1").click();
  5.     var path = document.getElementById("file1").value;
  6.     var size = (document.fileSize)*1;
  7.     var y = document.images;
  8.     var imglength = 0;
  9.         if (path != "" && path.search(imgRe) != -1)
  10.         { 
  11.             document.src = 'file://'+path;
  12.             {
  13.                 var img = new Image();
  14.                 img.src = 'file://'+path;
  15.                 for (i=0;i<y.length;i++)
  16.                 {
  17.                     imglength += (y[i].fileSize)*1;
  18.                 }
  19.             }
  20.  
  21.                 document.getElementById("ctl00_ContentPlaceHolder1_HideFileName").value = path;
  22.                 document.getElementById("ctl00_ContentPlaceHolder1_imgPhoto").setAttribute("src",path);
  23.  
  24.  
  25.  
  26.        }
  27.  
Jan 15 '11 #1
1 1779
CroCrew
564 Expert 512MB
Hello Sandipkumar,

All that you posted was your code. No question or explanation of what the code is. You have not provided full details towards your question.

Please take some time and provide us with more detail as to what your trying to do and the problem your encountering.

Happy programming,
CroCrew~
Jan 18 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Surendra | last post by:
Hi to all, Can any one of u solve my problem. How can i show a message box on client side using class library of .net it may be vb.net or c#.net. If any1 has any idea about it. Please let me...
2
by: AP No spam | last post by:
Hi I need help to Print Pdf File directly without preview from client side To solve problem I used This C# code Response.Buffer = true;
2
by: jcvoon | last post by:
Hi: It is possible to send a downloaded pdf file to fax printer using javascript ? something like this, but i can't make the following code work. function FaxDocument() { var faxServer =...
0
by: hazz | last post by:
After generating an XML Web Service proxy class using wsdl.exe, I added a proxy class to a new VS2005 project to consume my webservice. I want to call the method ReturnCustomer() whose proxy...
2
by: xander.zone.3x | last post by:
How can we download data in tables in a html page into a csv file using client side Javascript. I should click a button and a table's data should be downloaded into a csv in local drive. The os...
7
by: Ale | last post by:
can anyone plzzz tell how to store data at the client side using jsp's or servlets?
1
by: zanzo | last post by:
I am new to asp, and i need to upload an image so could somebody help me??
4
by: pskvenkat | last post by:
Hi this is venkat, i have a drop downlist for country, i composed a code in javascript for that and its working in HTML page but i dont know how to call the same javascript function in asp.net(C#)...
9
by: shailaja.sheel | last post by:
Hi , This is my first attempt to do some html/javascript programming and I am totally lost. I have a questionaire form and when user clicks Submit, I want to save the data in XML file on client...
3
by: malathib | last post by:
Hi, In my web application, in one of the screen when the user clicks on one link, it has to open a folder that was located in server in client side.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.