By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,624 Members | 1,765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,624 IT Pros & Developers. It's quick & easy.

Submitting an image to a form by dragging & dropping

P: n/a
joe
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

Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
In article <11**********************@f14g2000cwb.googlegroups .com>,
jo*@via.net 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...+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

Jul 23 '05 #2

P: n/a
joe
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.

Jul 23 '05 #3

P: n/a
In article <11**********************@l41g2000cwc.googlegroups .com>,
jo*@via.net 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

Jul 23 '05 #4

P: n/a
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 <11**********************@l41g2000cwc.googlegroups .com>,
jo*@via.net 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.

Jul 23 '05 #5

P: n/a
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

Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.