I have an html page with a specific input field and I want to add the following functions.
The user should be able to drag the resource into the field. The result of this action should be that the resource URL appears in the field.
The resource can be a local file, resulting in a URL, for example file:///home/me/document or file://c:\windows-files\document.doc .
The resource can also be a web resource, which leads to a URL like http://host.nl/document.doc or even ftp://host.nl/document.doc , although at the moment I'm not interested in ftp resources . I accept the dnd action of a web page URL from the address bar of a web browser or the dnd action of a file on a client computer, such as the desktop.
As usual for web applications, I want this functionality to work on most platforms. (Linux / Win / MacOS, Firefox / Chrome / Safari / IE / Opera)
The paradigm is html and JavaScript.
javascript html url drag-and-drop
Rinke
source share