HighDots Forums  

Drag a file from Desktop and Drop into Browser File Element

Javascript JavaScript language (comp.lang.javascript)


Discuss Drag a file from Desktop and Drop into Browser File Element in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sirisha
 
Posts: n/a

Default Drag a file from Desktop and Drop into Browser File Element - 06-11-2008 , 06:41 AM






Hi ...
Is it possible to drag a file from Client Desktop into the
Browser Form File Element(input type='file') instead of File Browse?
I know that, File drag is possible in the Mozilla Firefox
Browser by adding ADD-ON "DragDropUpload".But I want to implement this
functionality using the JavaScript/Ajax Code in PHP Application and it
should be compatible to all the Browsers in PC and iPhone and Windows
Phone.
Please, let me know your valuable suggestions and help to solve my
problem.

Thanks in Advance,
Sireesha.
(PHP Programmer).

Reply With Quote
  #2  
Old   
Joost Diepenmaat
 
Posts: n/a

Default Re: Drag a file from Desktop and Drop into Browser File Element - 06-11-2008 , 06:45 AM






Sirisha <revu.sirisha (AT) gmail (DOT) com> writes:

Quote:
Hi ...
Is it possible to drag a file from Client Desktop into the
Browser Form File Element(input type='file') instead of File Browse?
I know that, File drag is possible in the Mozilla Firefox
Browser by adding ADD-ON "DragDropUpload".But I want to implement this
functionality using the JavaScript/Ajax Code in PHP Application and it
should be compatible to all the Browsers in PC and iPhone and Windows
Phone.
Please, let me know your valuable suggestions and help to solve my
problem.
Again: the file element has very limited styling and scripting
possibilities because of *serious* security implications. In other
words: drag & drop on a file element is either suppported by whatever
browser the visitor is using, or not. There is nothing you can do in
client-side javascript to change that, so don't even try.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


Reply With Quote
  #3  
Old   
kadkaz@gmail.com
 
Posts: n/a

Default Re: Drag a file from Desktop and Drop into Browser File Element - 07-08-2008 , 07:04 AM



It is can be done.
For IE explorer it is easy but code that i found does not work yet.
For FireFox the code is worked.
See http://straxus.javadevelopersjournal...d_script_p.htm

It is not necessarily to get the file. It is necessarily to get the
path and then you can got it through Ajax if you want.

Reply With Quote
  #4  
Old   
Joost Diepenmaat
 
Posts: n/a

Default Re: Drag a file from Desktop and Drop into Browser File Element - 07-08-2008 , 07:51 AM



kadkaz (AT) gmail (DOT) com writes:

Quote:
It is can be done.
For IE explorer it is easy but code that i found does not work yet.
For FireFox the code is worked.
See http://straxus.javadevelopersjournal...d_script_p.htm

It is not necessarily to get the file. It is necessarily to get the
path and then you can got it through Ajax if you want.
If I read that correctly, you basically have to grant the web page
permission to read and upload *any* file on your file system. I
wouldn't grant that permission to any site that I don't control
myself.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.