...

View Full Version : DragAndDrop - onDrop: Change position



DefKev
11-02-2004, 10:38 PM
Somebody can tell me what do i have to add at the 'onDrop : function' in the below script to drop the button at the cursor position after the user released the button ?



var windowObserver =
{
onDragStart : function (element, transferData)
{
var Button = document.getElementById('Button');

transferData.data = new TransferData();
transferData.data.addDataForFlavour('Button-ID', Button);
},

getSupportedFlavours : function ()
{
var flavours = new FlavourSet();
flavours.appendFlavour('Button-ID');
return flavours;
},

onDrop : function (){},
};

canadianjameson
11-03-2004, 01:34 AM
would it not be onmouseup?

DefKev
11-03-2004, 02:22 AM
would it not be onmouseup?

Should i have to clarify that this is more an xul related question, if 'Yes', i excuse this mistake :)

If i try to set the x/y via setAttribute at 'onDrop' i get an 'NS_ERROR_FAILURE' ala 'What to drop, no data' !?!

Willy Duitt
11-03-2004, 02:49 AM
Should i have to clarify that this is more an xul related question, ....

It would stand to reason that it would be in your best interest to clarify whatever is necassary to aide whomever is willing to help you...

DefKev
11-03-2004, 03:33 PM
It would stand to reason that it would be in your best interest to clarify whatever is necassary to aide whomever is willing to help you...

The situation was what i had a simple window/stack/whatever with an 'onDragGesture', 'onDrop' ...

inside this was a button which calls the below *.js whenever the user starts dragging the button (drag and motion), the problem was that i had no idea what to call after the user has released the button somewhere inside this area to drop the button at the chosen position ('onDrop').

I allready figured it out, so, hm ... thanks anyway

Willy Duitt
11-03-2004, 04:19 PM
It would stand to reason that it would be in your best interest to clarify whatever is necassary to aide whomever is willing to help you...

The situation was what i had a simple window/stack/whatever with an 'onDragGesture', 'onDrop' ...

inside this was a button which calls the below *.js whenever the user starts dragging the button (drag and motion), the problem was that i had no idea what to call after the user has released the button somewhere inside this area to drop the button at the chosen position ('onDrop').

I allready figured it out, so, hm ... thanks anyway

No need to thank me, anyways or not....
What you quoted was the extent of what I was willing to contribute... I only thought I should point out that sarcasm does not inspire nor promote effective feed back.... Just remember, it is you seeking a solution... Not someone else seeking a problem to solve....

.....Willy

DefKev
11-03-2004, 05:32 PM
No need to thank me, anyways or not....
What you quoted was the extent of what I was willing to contribute... I only thought I should point out that sarcasm does not inspire nor promote effective feed back.... Just remember, it is you seeking a solution... Not someone else seeking a problem to solve....

.....Willy

I can't see any sarcasm in my question, so why do you start b!tching me ?

I have asked a DOM related question, and i expected a answer on my question not someone replying to it like 'im a retard' (this is not the reason why i visit a forum) !

If you don't want or can answer a question in a constructionally way, stop wasting other peoples time, it's not my debt if you misunderstand thinks.

'Thanks anyway' : a politeness phrase for taking your time and replying to my question, nothing more - nothing less.

Willy Duitt
11-03-2004, 06:42 PM
Where I'm sitting...

hm... thanks anyway is no more polite than Should i have to clarify that this is more an xul related question, if 'Yes', i excuse this mistake...

Both come off as sarcastic... And if you can not see that my posts were politely trying to show that your posts came off as sarcastic... Perhaps its you whom are wasting your own time... Without comprehension, you will only continue to flounder and repeat the same mistakes of the past...

Have a nice day;
.....Willy

DefKev
11-03-2004, 07:23 PM
Have a nice day too.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum