Drag And Drop from URL to Outlook Email


C

Craig Street

Hi

I'm trying to find out if its possible to build the following drag and
drop behaviour using javascript.

Drag : I want to drag a URL from a webpage. Clicking on the (rather
than dragging) would stream the document from server to the browser
with the appropriate content type (eg application/msword for a Word
document).

Drop : I want to be able to drop this on an Outlook email being
composed.

Result : the document that the URL was pointing to would be downloaded
and attached to the email message upon the drag and drop operation.

Obviously, the simpler two step operation would be to download the
document to your local drive or temp drive and then attach the
downloaded document to the email. What i'm trying to do is emcompass
both of these actions in a drag and drop action.

Any thoughts appreciated. Many thanks
 
Ad

Advertisements

D

Doug Miller

Hi

I'm trying to find out if its possible to build the following drag and
drop behaviour using javascript.

Drag : I want to drag a URL from a webpage. Clicking on the (rather
than dragging) would stream the document from server to the browser
with the appropriate content type (eg application/msword for a Word
document).

Drop : I want to be able to drop this on an Outlook email being
composed.

Result : the document that the URL was pointing to would be downloaded
and attached to the email message upon the drag and drop operation.

Obviously, the simpler two step operation would be to download the
document to your local drive or temp drive and then attach the
downloaded document to the email. What i'm trying to do is emcompass
both of these actions in a drag and drop action.

Any thoughts appreciated. Many thanks

My first thought is, WHY?

What possible advantage does this confer, over simply emailing the URL?
 
Ad

Advertisements

T

Thomas 'PointedEars' Lahn

Craig said:
I'm trying to find out if its possible to build the following drag and
drop behaviour using javascript.

Although I find it rather unlikely, I cannot tell you for sure if it is
possible. However, I can tell you what would be the requirements; HTH.
Drag : I want to drag a URL from a webpage. Clicking on the (rather
than dragging) would stream the document from server to the browser
with the appropriate content type (eg application/msword for a Word
document).

That would mean the browser needed to make an HTTP request, and the response
message needed to be stored or displayed somewhere. If stored, that would
need to be an OLE object that has a draggable representation. If displayed,
you need a proper plugin for the content type that supports OLE dragging.

For retrieval-and-storage you will need at least XHR and (XP)COM. For
display, there are several plugins and extensions available that can display
e.g. Word documents (there is, e.g., the Word Viewer plugin which Office
provides, and Google Documents as provided by the Google Toolbar extension).
I do not know and I cannot test right now if they support dragging to other
application windows.
Drop : I want to be able to drop this on an Outlook email being
composed.

Result : the document that the URL was pointing to would be downloaded
and attached to the email message upon the drag and drop operation.

You will need an Outlook plugin (or a built-in feature, I am not that
well-versed in versions of Outlook newer than 2003) that accepts arbitrary
draggable representations of objects.

I do not know whether that can be achieved using client-side scripting.
However, the only Outlook extension I have seen to date (of SugarCRM) uses
DLLs (.ocx, IIRC), so it is probably not (entirely) written with scripting
(perhaps C++ instead).

I think your chances of success would increase if you would let the browser
only provide the draggable link object (for which support is built into many
browsers already), and let the target of the drag-and-drop operation, here
(an) Outlook (extension), make the HTTP request and create the object
according to the received URI.
Obviously, the simpler two step operation would be to download the
document to your local drive or temp drive and then attach the
downloaded document to the email.

Yes, indeed.


PointedEars
 

Top