<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1515" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2>Paul,</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>I
remember I had a couple of errors when I started using DBox... I
made some changes to the javascript code, and I am quite
sure one of these changes corrected the problem you
mention.</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>In the
"dBox_mousemove" function, try replacing the following line:</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>
var t = e.target.parentObject;<BR></FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2>with:</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>
var t = this.object;<BR> if (!t) return;</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>Where:
"this.object" was declared in the constructor, and initialized in the
"mousedown" function, as follows:</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>
var t = e.target.parentObject;<BR> <STRONG>this.object</STRONG> <STRONG>=
t</STRONG>; // Here it points to the correct
target</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>What
happens is that the Source (or target) of the mousemove event changes when your
cursor leaves the map area, so that "target.parentObject" is not the DBox object
anymore...</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>Maybe
someone has a better workaround though... This one works great with IE, but
not with FireFox.</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>Hope
this helps!</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2>Stephane Lessard</DIV>
<DIV><BR></DIV></FONT></SPAN>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff
size=2> </DIV></FONT></SPAN><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De :</B> Paul james
[mailto:pauljame@GMAIL.COM] <BR><B>Envoyé :</B> 5 septembre 2005
14:41<BR><B>À :</B> MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Objet :</B>
[UMN_MAPSERVER-USERS] dBox Problem...<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Hi... I´m using this sample :</DIV>
<DIV><A
href="http://www.dnr.state.mn.us/maps/landview.html">http://www.dnr.state.mn.us/maps/landview.html</A></DIV>
<DIV> </DIV>
<DIV>But when I draw a box until the limits, an error hapened in javascript:
"'drag' is null ... "</DIV>
<DIV> </DIV>
<DIV>Any idea?</DIV>
<DIV> </DIV>
<DIV>Thank you</DIV></BLOCKQUOTE></BODY></HTML>