Murali, <br>
<br>
Do you have some sample code that you could paste? It&#39;s hard to debug these sort of things without a good stack trace. <br>
<br>
One thing that comes to mind is are you setting the width and height
properties on your map div? the getCurrentSize() function below first
tries to read clientHeight/Width but if that fails, it uses the
getDimensions() function and then as last resort style.height and
style.width. <br>
<br>
--Erik<br>
<br>
&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * @private <br>
&nbsp;&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp;&nbsp; * @returns A new OpenLayers.Size object with the dimensions of the map div<br>
&nbsp;&nbsp;&nbsp;&nbsp; * @type OpenLayers.Size<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; getCurrentSize: function() {<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var size = new OpenLayers.Size(this.div.clientWidth, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
this.div.clientHeight);<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Workaround for the fact that hidden elements return 0 for size.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (size.w == 0 &amp;&amp; size.h == 0 || isNaN(size.w) &amp;&amp; isNaN(size.h)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var dim = OpenLayers.Element.getDimensions(this.div);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size.w = dim.width;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size.h = dim.height;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (size.w == 0 &amp;&amp; size.h == 0 || isNaN(size.w) &amp;&amp; isNaN(size.h)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size.w = parseInt(this.div.style.width);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size.h = parseInt(this.div.style.height);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return size;<br>
&nbsp;&nbsp;&nbsp; },<br><br><div><span class="gmail_quote">On 4/25/07, <b class="gmail_sendername">Murali Maddali</b> &lt;<a href="mailto:murali.maddali@uai.com">murali.maddali@uai.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">






<div>
<div><font face="Arial" size="2"><span>Hello 
All,</span></font></div>
<div><font face="Arial" size="2"><span></span></font>&nbsp;</div>
<div><font face="Arial" size="2"><span>I want to check and 
see if any one has seen this error before.</span></font></div>
<div><font face="Arial" size="2"><span></span></font>&nbsp;</div>
<div><font face="Arial" size="2"><span>My map is turned off 
or on based on display style being to set to none or block. On my initial page 
load I have the display set to none and but I am trying to initialize the map 
and trying to zoom to a given extent. When ever I try to zoom to a given extent 
I get the &quot;element has no properties&quot; error in Events.js. On further debugging I 
narrowed the error down to getSize method when it tries to calculateBounds for 
the current map.&nbsp;The&nbsp;current div is not displayed and its clientWidth 
and clientHeight are not returned.&nbsp;</span></font></div>
<div><font face="Arial" size="2"><span></span></font>&nbsp;</div>
<div><font face="Arial" size="2"><span>This is where I run 
into error this is within setCenter method in Map.js file.</span></font></div>
<div><font face="Arial" size="2"><span></span></font>&nbsp;</div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var 
bounds = this.getExtent();<span> //here the bounds 
are&nbsp;calculated from the current map and the returned bounds are 
invalid.</span><br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//send the move call to the baselayer and all the overlays&nbsp;&nbsp;&nbsp; 
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
this.baseLayer.moveTo(bounds, zoomChanged, dragging);<br></font></div>
<div><font><span><font face="Arial" size="2">Any 
suggestions are greatly appreciated.</font></span></font></div>
<div><font><span><font face="Arial" size="2"></font></span></font>&nbsp;</div>
<div><font><span><font face="Arial" size="2">Thank you 
all.</font></span></font></div>
<div><font><span><font face="Arial" size="2"></font></span>&nbsp;</font></div>
<div align="left"><font face="Arial" size="2">Regards,</font></div>
<div align="left"><font face="Arial" size="2">Murali K. Maddali</font></div>
<div align="left"><font face="Arial" size="2">UAI, Inc.</font></div>
<div align="left"><font face="Arial" size="2">(256) 705-5191 (W)</font></div>
<div align="left"><font face="Arial" size="2"><a href="mailto:murali.maddali@uai.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">murali.maddali@uai.com</a></font></div>
<div align="left"><font face="Arial" size="2"></font>&nbsp;</div>
<div align="left"><font face="Arial" size="2"><i>&quot;Always bear in mind that your own 
resolution to succeed is more important than any one thing.&quot; - Abraham 
Lincoln<br></i></font></div>
<div>&nbsp;</div>This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email in
error please notify the sender. This message contains confidential
information and is intended only for the individual named. If you are
not the named addressee you should not disseminate, distribute or copy
this e-mail.</div>
<br>_______________________________________________<br>Users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openlayers.org/mailman/listinfo/users" target="_blank">
http://openlayers.org/mailman/listinfo/users</a><br><br></blockquote></div><br>