473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Drag a file from Desktop and Drop into Browser File Element

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).
Jun 27 '08 #1
3 2259
Sirisha <re**********@gmail.comwrites:
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/
Jun 27 '08 #2
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.
Jul 8 '08 #3
ka****@gmail.com writes:
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/
Jul 8 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jack | last post by:
Hi All, I want to drag and drop a file from the desktop to an html page and show the file name in the htmlpage. It's possibile? How can I do? Thank you Daniele
1
by: Ryan Stewart | last post by:
If you don't want to read this post because of its length, I understand. I've spent two and a half days on this problem and have a good deal of information to relate. And this is kind of a long...
2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
3
by: Ajay Krishnan Thampi | last post by:
I have a slight problem implementing 'drag and drop' from a datagrid to a tree-view. I have pasted my code below. Someone please advice me on what to do...pretty blur right now. ==code== ...
6
by: jojobar | last post by:
Hello, I look at the asp.net 2.0 web parts tutorial on the asp.net web site. I tried to run it under firefox browser but it did not run. If I want to use this feature in a commercial product...
3
by: petermichaux | last post by:
Hi, I am trying to put together the last major pieces of my project's puzzle. This is more website/client-side architecture than JavaScript syntax but I hope this is a good place to ask. I'm a...
2
by: Sjaakie | last post by:
Is it possible to request filename and path of a file dragged from eg. the desktop onto a drop-event-enabled element? If so, an example will be appreciated. Cheers
3
by: crazystone82 | last post by:
Hi friends, i need to drag a file from desktop and drop into web page.actually i had did a JS for dragging the images around the web page,but i dont know how to drag the file and drop it into...
1
by: kidelectric | last post by:
The issue I am having is that I would like to be able to drag-and-drop div elements that have rounded corners.* Since these elements will be dynamically created (including background color), I could...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.