nikhil
unread,Nov 30, 2010, 3:52:42 PM11/30/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to phonegap, mhatre...@gmail.com
Hi,
I'm learning Javascript, Html and phonegap at the same time, so spare
my lack of knowledge.
I need to be able to click a picture and send the image along with
some other data to a server.
Find below the code for the analogous functionality in coded for the
browser.
<form id="upload" method="POST" enctype="multipart/form-data" action="/
upload/">
<fieldset>
<legend>Upload a leaf image</legend>
<input type="file" name="myfile" />
<input type="hidden" name="user" value="test" />
<input type="hidden" name="passwd" value="test" />
<input type="hidden" name="fmt" value="json" />
<input type="submit" id="uploadsubmit" name="Upload"
value="Upload" />
</fieldset>
</form>
I need to be able to send all that data to the server. The input type
file will be an image that i take from the camera using the
getPicture() call using phonegap.
I want this event to take place as soon as the user clicks a picture.
I want the POST request to be sent without user intervention. SO i was
thinking to use the XmlHttpRequest object to make this POST request.
Is there any way to send an image alongwith the other data using
XmlHttpRequest?
Really appreciate all the help possible!
Thanks and Regards,
Nikhil