Hi!

I have a piece of code for drag and drop as follows :

<?php header( "Content-type: application/vnd.mozilla.xul+xml" ); ?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>

<window id="Drag and Drop"
    xmlns:html="http://www.w3.org/1999/xhtml";
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
    autostretch="never">

<html:script src="chrome://global/content/nsDragAndDrop.js" />
<html:script src="chrome://global/content/nsTransferable.js" />
<html:script src="chrome://global/content/nsJSSupportsUtils.js" />
<html:script src="chrome://global/content/nsJSComponentManager.js" />

<html:script src="dragboard.js" />

<bulletinboard id="board" style="width:300px; height: 300px; 
max-width:300px;max-height: 300px; background: blue;"
ondragover="nsDragAndDrop.dragOver(event,boardObserver)"
ondragdrop="nsDragAndDrop.drop(event,boardObserver)">
<button label="asd"/>
</bulletinboard>
<box orient="vertical">
<button id="a" left="50" label="button" elem="button" 
ondraggesture="nsDragAndDrop.startDrag(event, listObserver);"/>
<button id="b" left="150" top="100" label="checkbox" elem="checkbox" 
ondraggesture="nsDragAndDrop.startDrag(event, listObserver);"/>
<button id="c" left="200" label="Text Box" elem="textbox" 
ondraggesture="nsDragAndDrop.startDrag(event, listObserver);"/>
</box>
</window>
-------------------------------------------------------------
dragboard.js is in the attachment folder.

The wonder if anyone could help get the source code working ?

Thanks,

Lee

Attachment: dragboard.js
Description: JavaScript source

Reply via email to