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
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
CSS: [url]http://www.matthewweiler.com/tempStuff/drag_and_Drop.js
working sample: [url]http://www.matthewweiler.com/tempStuff/test.html
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”>
</div>
</body>
</html>
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