Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Submitting an image to a form by dragging & dropping

Reply
Thread Tools

Submitting an image to a form by dragging & dropping

 
 
joe@via.net
Guest
Posts: n/a
 
      04-07-2005
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

 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      04-07-2005
In article < .com>,
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

 
Reply With Quote
 
 
 
 
joe@via.net
Guest
Posts: n/a
 
      04-08-2005
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.

 
Reply With Quote
 
kaeli
Guest
Posts: n/a
 
      04-08-2005
In article < .com>,
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

 
Reply With Quote
 
Csaba Gabor
Guest
Posts: n/a
 
      04-08-2005
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 < .com>,
> 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.
>

 
Reply With Quote
 
Matthew Lock
Guest
Posts: n/a
 
      04-11-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dragging and Dropping HTML instead of text Sammy Snyders ASP .Net Web Controls 1 06-29-2005 06:49 PM
Trouble dragging and dropping User Controls (ASP.NET) charliewest ASP General 1 11-11-2004 06:09 PM
Treeview Control Contents Dragging and Dropping rajiv malhotra ASP .Net Web Controls 0 10-02-2004 08:11 PM
ADSL Dropping But not Dropping!! Chris Bales Computer Support 9 08-29-2004 06:25 PM
Dropping and Dragging a file from the desktop onto a HTML page displayed in IE Jessica Hart Javascript 0 10-01-2003 03:43 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57