<!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>&nbsp;</DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>I 
remember I had&nbsp;a couple of&nbsp;errors when I started using DBox... I 
made&nbsp;some&nbsp;changes to the javascript code, and I&nbsp;am quite 
sure&nbsp;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>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>&nbsp; 
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>&nbsp;</DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>&nbsp; 
var t = this.object;<BR>&nbsp;&nbsp;if (!t) return;</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff size=2>&nbsp; 
var t = e.target.parentObject;<BR>&nbsp; <STRONG>this.object</STRONG> <STRONG>= 
t</STRONG>;&nbsp; // Here it points to the&nbsp;correct 
target</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</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>&nbsp;</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&nbsp;with FireFox.</FONT></SPAN></DIV>
<DIV><SPAN class=332343917-06092005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</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>&nbsp;</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>&nbsp;</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&nbsp;:</B> Paul james 
  [mailto:pauljame@GMAIL.COM] <BR><B>Envoyé&nbsp;:</B> 5 septembre 2005 
  14:41<BR><B>À&nbsp;:</B> MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Objet&nbsp;:</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>&nbsp;</DIV>
  <DIV>But when I draw a box until the limits, an error hapened in javascript: 
  "'drag' is null ... "</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Any idea?</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Thank you</DIV></BLOCKQUOTE></BODY></HTML>