Submitting an image to a form by dragging & dropping

Discussion in 'Javascript' started by joe@via.net, Apr 7, 2005.

  1. Guest

    I have an image database that I'd like to populate by dragging an image
    off the desktop and
    dropping onto a form (cut/paste would work equally as well)

    Any suggestions?

    Thanks,

    Joe

    joe at via.et
     
    , Apr 7, 2005
    #1
    1. Advertising

  2. kaeli Guest

    In article <>,
    enlightened us with...
    > I have an image database that I'd like to populate by dragging an image
    > off the desktop and
    > dropping onto a form (cut/paste would work equally as well)
    >
    > Any suggestions?


    Is there a reason the file input type isn't appropriate for this?
    If so, Google is your friend -- search drag and drop and you get lots of
    options. If not, just use the file input type.

    http://www.google.com/search?hl=en&q=javascript drag and drop

    Keep in mind that in general, client-side code cannot talk to a server-side
    database. You'll have to handle the image with server-side code (which means
    a form submit, generally speaking) once it's loaded onto the page, whether
    that be via drag and drop or a simple file input type.

    If this code is all on your client, including the database (i.e. HTA or CD
    application), say so. That's different. :)

    --
    --
    ~kaeli~
    When a clock is hungry, it goes back four seconds.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, Apr 7, 2005
    #2
    1. Advertising

  3. Guest

    Kaeli,

    Yes, I did search google for this. All of the hits were about dragging
    images already inside the browser window. A crossword puzzle is a good
    example of that.

    What I want is file input type, but instead of having to navigate
    through the file hierarchy using a file
    browser and then selecting the file, I would prefer to drag it's icon
    off the desktop and drop it onto a
    target area of my javascript application. It's much easier that way if
    you have hundreds of image files to upload.
     
    , Apr 8, 2005
    #3
  4. kaeli Guest

    In article <>,
    enlightened us with...
    > Kaeli,
    >
    > Yes, I did search google for this. All of the hits were about dragging
    > images already inside the browser window. A crossword puzzle is a good
    > example of that.
    >
    > What I want is file input type, but instead of having to navigate
    > through the file hierarchy using a file
    > browser and then selecting the file, I would prefer to drag it's icon
    > off the desktop and drop it onto a
    > target area of my javascript application. It's much easier that way if
    > you have hundreds of image files to upload.


    *plays around a bit*

    I don't think you can do this in this manner, as dragging a file onto MSIE is
    already handled by MSIE and it opens it. Firefox doesn't, but you get a funny
    little icon that indicates you can't do it.
    Although I might easily be missing something.

    Although this seems tedious in the extreme for hundreds of files.
    Put the image files in a directory and move it with FTP or something
    (filezilla or cuteftp come to mind).
    If you MUST use http protocol, make a little Java [or HTA or other
    language/application of choice] program to http upload the files in the
    directory.

    This is SO not a way to move hundreds of any kind of files, in any case.
    That's what FTP is for. Making someone drag hundreds of files one at a time
    isn't a very viable solution, IMO.

    --
    --
    ~kaeli~
    Does the name Pavlov ring a bell?
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
     
    kaeli, Apr 8, 2005
    #4
  5. Csaba Gabor Guest

    On my Win XP Pro Firefox (taken from a nightly build: ... rv:1.8b2)
    Gecko/20050320 Firefox/1.0+) if I drag a .jpg image from the desktop
    over the browser client area, I get a rectangle with a fuzzy border.
    If I release at this point, the browser displays the .jpg file,
    replacing the previous page, to which I can return with the back arrow.

    Csaba Gabor from Vienna

    kaeli wrote:
    > In article <>,
    > enlightened us with...
    >
    >>Kaeli,
    >>
    >>Yes, I did search google for this. All of the hits were about dragging
    >>images already inside the browser window. A crossword puzzle is a good
    >>example of that.
    >>
    >>What I want is file input type, but instead of having to navigate
    >>through the file hierarchy using a file
    >>browser and then selecting the file, I would prefer to drag it's icon
    >>off the desktop and drop it onto a
    >>target area of my javascript application. It's much easier that way if
    >>you have hundreds of image files to upload.

    >
    > *plays around a bit*
    >
    > I don't think you can do this in this manner, as dragging a file onto MSIE is
    > already handled by MSIE and it opens it. Firefox doesn't, but you get a funny
    > little icon that indicates you can't do it.
    > Although I might easily be missing something.
    >
     
    Csaba Gabor, Apr 8, 2005
    #5
  6. Matthew Lock Guest

    It's a java applet, but I have heard good things about this:
    http://jupload.sourceforge.net/

    It acts as a more sophisticated file upload control. From memory it
    allowed you to drag and drop multiple files into it and displayed a
    progress bar during the upload.

    Matthew
     
    Matthew Lock, Apr 11, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ravishankar Maduri
    Replies:
    5
    Views:
    410
    Jonathan N. Little
    Nov 21, 2007
  2. rajiv malhotra

    Treeview Control Contents Dragging and Dropping

    rajiv malhotra, Oct 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    168
    rajiv malhotra
    Oct 2, 2004
  3. Sammy Snyders

    Dragging and Dropping HTML instead of text

    Sammy Snyders, Jun 24, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    116
    Michael Baltic
    Jun 29, 2005
  4. charliewest
    Replies:
    1
    Views:
    139
    Jeff Dillon
    Nov 11, 2004
  5. Jessica Hart
    Replies:
    0
    Views:
    103
    Jessica Hart
    Oct 1, 2003
Loading...

Share This Page