Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes Drag and Drop event handlers for Firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Drag and Drop event handlers for Firefox" Watch "Drag and Drop event handlers for Firefox" New topic
Author

Drag and Drop event handlers for Firefox

Abhishek Asthana
Ranch Hand

Joined: Sep 08, 2004
Posts: 146
Hi

I need to implement drag and drop across frames and I tried using the latest Drag And Drop event handlers (in Firefox 3):
ondrag, ondragstart, ondragenter, ondragover etc. but nothing works.

My code is simple one:





This code should give an alert when one tries to drag the image. But absolutely nothing happens!

The example given on http://developer.mozilla.org/en/Drag_and_drop_events also doesn't seem to work. (The image never gets dragged anywhere!)

On this page: http://developer.mozilla.org/en/Drag_and_Drop the documentation says that ondragstart "is the HTML 5 spec name for the event and may be used in HTML or XUL handlers will work for both HTML and XUL."

The documentation says: "There are two ways that drag and drop events can be handled. This first involves using the drag and drop XPCOM interfaces directly. The second is to use a JavaScript wrapper object that handles some of this for you."

I am very confused with this. Can someone please tell me how to do drag and drop using these event handlers?

Any pointers/examples will help.

Thanks
Asty
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Drag and Drop event handlers for Firefox
 
Similar Threads
prevent html textfield from caching
Create DOM node with arbitrary HTML
basic question & LiveConnect question
basic question & LiveConnect question
Drag and Drop + Highlight in jsp