Omar Marques S. Filho

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromOmar Marques S. Filho
ToMe
SubjectDraggable layer stuck in Firefox
Date15 February 2005 7:55
Hi. I'm having problems using the MM_dragLayer script, provided with Macromedia
Dreamweaver, when running it on Mozilla Firefox (latest version). This script
is not working under Firefox. So, the layer that should be draggable simply
gets stuck, it doesn't comes out from its place. In addition, I don't get
any error message from the status bar or the Javascript Console. But when
opening the same HTML file on Internet Explorer 6.0, the layer becomes draggable
normally.
Could you help me with this issue, or maybe point to another place where
I can get some help? I've tried at Mozilla knowledge bases and forums, but
didn't found nothing about.

Thanks in advance

Omar Marques
FromMe
ToOmar Marques S. Filho
SubjectRe: Draggable layer stuck in Firefox
Date15 February 2005 8:55
Omar,

Macromedia are not the best web programmers. Their scrips generally cope
with many situations, but their level of cross browser support leaves a lot
to be desired.

simply remove their script, and either use mine:
http://www.howtocreate.co.uk/jslibs/otherdemo.html#gdl

or use my DHTML API script to make your own (this is more accessible):
http://www.howtocreate.co.uk/tutorials/jsexamples/movetooltip.html

<div id="canbedragged" style="position:absolute;">foo</div>
<script type="text/javascript" src="dhtmlapi.js"></script>
<script type="text/javascript"><!--
var div = MWJ_findObj( 'canbedragged' );
if( div ) {
if( div.captureEvents ) {
 div.captureEvents( Event.MOUSEMOVE );
}
div.onselectstart = function () { return false; }
div.onmousedown = function (e) {
 var xM = MWJ_getMouseCoords(e);
 var xP = MWJ_getPosition(this);
 window.sO = [xM[0]-xP[0],xM[1]-xP[1]];
 MWJ_monitorMouse( function () {
   MWJ_changePosition(
     'canbedragged',
     MWJ_getMouse[0]-sO[0],
     MWJ_getMouse[1]-sO[1],
     true
   );
 } );
 if( document.captureEvents ) {
   document.captureEvents( Event.MOUSEUP );
 }
 document.onmouseup = function (e) {
   document.onmousemove = null;
   document.onmouseup = null;
   if( document.releaseEvents ) {
     document.releaseEvents( Event.MOUSEMOVE );
     document.releaseEvents( Event.MOUSEUP );
   }
 };
}
}
//--></script>


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.