W3C home > Mailing lists > Public > public-device-apis@w3.org > December 2009

Re: <input type=photo> etc as Capture API

From: Arve Bersvendsen <arveb@opera.com>
Date: Thu, 03 Dec 2009 13:30:21 +0100
To: "Ilkka Oksanen" <Ilkka.Oksanen@nokia.com>
Cc: "public-device-apis@w3.org" <public-device-apis@w3.org>
Message-ID: <op.u4c3ov06byn2jm@galactica>
On Thu, 03 Dec 2009 12:57:41 +0100, Ilkka Oksanen  
<Ilkka.Oksanen@nokia.com> wrote:

>
> navigator.device.captureImage(function(data) {
>    // send the image to server side script
>    }, 1);
>  How much more complex would equivalent <input> based solution be?

You're leaving out some details here, encapsulated by:

    // send the image to server side script

In your case you have to:

1. Extract the encapsulated data
2. Create an HTML form
3. Submit the data

(Steps two and three could be done using a hypothetical, not yet  
generally-implemented version of XHR)

In the <input>/web forms based case, you have to

1. Submit the form

-- 
Arve Bersvendsen

Opera Software ASA, http://www.opera.com/
Received on Thursday, 3 December 2009 12:31:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:02 GMT