473,322 Members | 1,421 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,322 software developers and data experts.

HTML5 - Copying image taken from <input> to <img>

Hi,
I am trying to take a photo using HTML5 input field, and need to move it to a img tag as below:

Expand|Select|Wrap|Line Numbers
  1. <p>Capture Image: <input type="file" accept="image/*" id="f_capture" capture="camera"/> </p>
  2.  
  3. <img id="imageholder" src="" />
In Chrome (for testing), when I try to
$("#f_capture").val() evaluates to C:\fakepath\photo.JPG"

I am not sure how to extract the value from the input field like I would normally do with ordinary <input> items.

Any help appreciated. Thanks.
Jun 3 '14 #1
1 1597
Dormilich
8,658 Expert Mod 8TB
In Chrome (for testing), when I try to
$("#f_capture").val() evaluates to C:\fakepath\photo.JPG"
looks like it’s working …

anyways, file inputs implementing the File API can be used as:
Expand|Select|Wrap|Line Numbers
  1. var fileName = document.getElementById('f_capture').files[0].name;
Jun 3 '14 #2

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

Similar topics

3
by: Ray Price | last post by:
I want to use a server-side C# script to copy an image from a remote URL to a local file in the web directory. I tried using File.Copy from the System.IO namespace but it doesn't support URL. ...
2
by: Andreas Viklund via DotNetMonster.com | last post by:
Hi! I am developing an application in ASP.NET that takes an image, that have been created with a digital camera or camera phone, and processes it, to get data from it. The image taken by the user...
0
by: shaira | last post by:
I opened one .svg image in internetexplorer.now i want to access the properties of that image and i need to access the copy SVG property of that image through code(I mean any language).especially in...
6
by: swethak | last post by:
Hi, I displayed the image taken from database.How to raotate that image using javascript.plz tell that how to start the logic.plz tell that some reference websites.
7
by: David Stone | last post by:
Run into something recently that has left me a little puzzled. According to the examples in section 13.6.1 of html 4.01... <http://www.w3.org/TR/html401/struct/objects.html#h-13.6.1.1> I...
2
by: chazzy69 | last post by:
This is a little hard to explain but i will try to make it as clear as possible. Firstly here's the setup, 2 databases on 2 different servers (databases are identical) now within the first...
12
tpgames
by: tpgames | last post by:
Okay, I admit I was lousy at DIV tags before HTML5. However, 4.01 is leaving us, and I'm making a new site, and wanted to do it right in HTML5/CSS3. Nothing fancy, just wanted... THIS content ...
2
by: NewtoHTML5 | last post by:
I'm converting a circa 2002 website to comply with html5/CSS3, without rewriting it extensively. I'm not familiar with the nuances of HTML5 in terms of rendering, and I can't find this particular...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.