Connecting Tech Pros Worldwide Forums | Help | Site Map

Submitting an image to a form by dragging & dropping

joe@via.net
Guest
 
Posts: n/a
#1: Jul 23 '05
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


kaeli
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Submitting an image to a form by dragging & dropping


In article <1112847496.276183.242570@f14g2000cwb.googlegroups .com>,
joe@via.net enlightened us with...[color=blue]
> 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?[/color]

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...+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

joe@via.net
Guest
 
Posts: n/a
#3: Jul 23 '05

re: Submitting an image to a form by dragging & dropping


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.

kaeli
Guest
 
Posts: n/a
#4: Jul 23 '05

re: Submitting an image to a form by dragging & dropping


In article <1112991752.296448.307390@l41g2000cwc.googlegroups .com>,
joe@via.net enlightened us with...[color=blue]
> 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.[/color]

*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

Csaba Gabor
Guest
 
Posts: n/a
#5: Jul 23 '05

re: Submitting an image to a form by dragging & dropping


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:[color=blue]
> In article <1112991752.296448.307390@l41g2000cwc.googlegroups .com>,
> joe@via.net enlightened us with...
>[color=green]
>>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.[/color]
>
> *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.
>[/color]
Matthew Lock
Guest
 
Posts: n/a
#6: Jul 23 '05

re: Submitting an image to a form by dragging & dropping


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

Closed Thread