/    Sign up×
Community /Pin to ProfileBookmark

Help with Drag-and-Drop in Opera

Hi,
I’ve developed a small “Drag-and-Drop” utility in Javascript.
It works perfectly in IE and FF, but not in Opera.

Problem: In Opera the onMouseUp (releasing the channel) is not being caught, thus the channel cannot be dropped.
([I]only way to drop it is to right/center click the page, then left-click somewhere off of the dragged channel header[/I])

Anyone can take and harvest this code…just please keep my name in the .JS file as creator ?

The JS and CSS files are both kinda long, so I stored them somewhere.

Javascript: [url]http://www.matthewweiler.com/tempStuff/drag_and_Drop.css[/url]
CSS: [url]http://www.matthewweiler.com/tempStuff/drag_and_Drop.js[/url]
working sample: [url]http://www.matthewweiler.com/tempStuff/test.html[/url]

Sample HTML:

[code=html]
<html>
<head>
<title>Testing Drag and Drop Boxes</title>
<link rel=”stylesheet” type=”text/css” href=”drag_and_Drop.css” />
<script type=”text/javascript” src=”drag_and_Drop.js”></script>
</head>
<body>
<br />
<br />
<br />
<div id=”colsArea” name=”colsArea”>
&nbsp;
</div>
</body>
</html>
[/code]

SOME THINGS YET TO COME:
– when grabbing a channel, i’ll store the mouse offset, in-relation to the channel header, instead of centering the channels header on the mouse

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @GoldenEye4ever spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...