Hi all, I found phonegap yesterday, they have some examples on their site that show how to take a picture and another how to upload but I am having a hard combining the two examples. My goal it to be able to load my app, press a button, take a picture, the picture be displayed (and if acceptable) add a short title or description to the image then upload to the server.

here is the camera documentation (2.3.0): http://docs.phonegap.com/en/2.3.0/co...md.html#Camera

and here is the script i used to upload:
        <title>File Transfer Example</title>
        <script type="text/javascript" charset="utf-8" src="cordova-2.2.0.js"></script>
        <script type="text/javascript" charset="utf-8">
            var pictureSource;   // picture source
            var destinationType; // sets the format of returned value

            // Wait for Cordova to load
            document.addEventListener("deviceready", onDeviceReady, false);
            // Cordova is ready
            function onDeviceReady() {
                // Retrieve image file location from specified source

            function browse(){
                                            function(message) { alert('get picture failed'); },
                                            { quality: 50,
                                            destinationType: navigator.camera.DestinationType.FILE_URI,
                                            sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY }
            function uploadPhoto(imageURI) {
                var options = new FileUploadOptions();
                var params = {};
                params.value1 = "test";
                params.value2 = "param";
                options.params = params;
                var ft = new FileTransfer();
                ft.upload(imageURI, encodeURI("http://www.example.com/upload.php"), win, fail, options);
            function win(r) {
                console.log("Code = " + r.responseCode);
                console.log("Response = " + r.response);
                console.log("Sent = " + r.bytesSent);
            function onFileSystemSuccess(fileSystem) {
            function onResolveSuccess(fileEntry) {
            function fail(evt) {

            function fail(error) {
                alert("An error has occurred: Code = " + error.code);
                console.log("upload error source " + error.source);
                console.log("upload error target " + error.target);
        <button onclick="browse();">upload photo</button> <br>

        <p>Upload File</p>
I really hope somebody can help me get on the right track here!