Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drag and Drop event handlers for Firefox

 
Abhishek Asthana
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic