<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET AJAX UI</title><link>http://forums.asp.net/1008.aspx</link><description>Here you can discuss UI-related issues with AJAX such as controls and client-side functionality including Silverlight controls for ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Sys$UI$DomElement$getLocation(element) causes javascript unspecified error</title><link>http://forums.asp.net/thread/2326314.aspx</link><pubDate>Tue, 29 Apr 2008 01:02:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2326314</guid><dc:creator>gchq</dc:creator><author>gchq</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2326314.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2326314</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m having the same issue - an &amp;#39;extender&amp;#39; div is created by clicking on the &amp;#39;+&amp;#39; icon and replaced with a &amp;#39;-&amp;#39; icon and the code blows out at &amp;#39;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-ansi-language:EN-US;"&gt;var clientRects = element.getClientRects()&amp;#39; Does anyone have a way of overcoming this?&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Sys$UI$DomElement$getLocation(element) causes javascript unspecified error</title><link>http://forums.asp.net/thread/2165044.aspx</link><pubDate>Mon, 11 Feb 2008 07:59:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2165044</guid><dc:creator>yonishec</dc:creator><author>yonishec</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2165044.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2165044</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;While working with ExtJs library and it&amp;#39;s grid i had the same exception thrown from my JS code. In my scenario i have an image in my grid that by selecting it a column in the row that the image was click is changed and then changed back. When i set and change the data in my grid i got the same &amp;quot;unspecifed error&amp;quot; that was thrown from inside the getLocation method in line &amp;quot;var clientRects = element.getClientRects();&amp;quot;&lt;/p&gt;
&lt;p&gt;As i understand from other forums, the probvlem is that while i change the data in the grid, the grid is created again and when the ajax tries to validate the click event it does not find the image that i clicked on.&lt;/p&gt;
&lt;p&gt;After a while, i found this solution you give here to override the getLocation method. My prpblem is that when i insert this code to my page i get a new exception &amp;quot;&amp;quot;Sys.ArgumentTypeException: Object of type &amp;#39;Object&amp;#39; cannot be converted to type &amp;#39;Sys.UI.DomElement&amp;#39;.&amp;quot;.&lt;/p&gt;
&lt;p&gt;For my own reason i added a &amp;quot;return&amp;quot; statment right after the starting body of the function.&lt;/p&gt;
&lt;p&gt;Is there any thing i&amp;#39;m doing wrong. Is there someother workaround to this problem. Is there any code i can supply that mught help someone understand my problem and mught help me????&lt;/p&gt;
&lt;p&gt;Thank yon,&lt;/p&gt;
&lt;p&gt;Joni.&lt;/p&gt;</description></item><item><title>Re: Sys$UI$DomElement$getLocation(element) causes javascript unspecified error</title><link>http://forums.asp.net/thread/1446531.aspx</link><pubDate>Mon, 30 Oct 2006 14:55:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1446531</guid><dc:creator>Ludek Trefny</dc:creator><author>Ludek Trefny</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1446531.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1446531</wfw:commentRss><description>&lt;p&gt;Just only put this javascript code into your page to fix it:&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="cmt"&gt;// ASP.NET AJAX fix&lt;/span&gt;
            Sys.UI.DomElement.getLocation = function(element) {     
                &lt;span class="cmt"&gt;/// &amp;lt;param name=&amp;quot;element&amp;quot; type=&amp;quot;Sys.UI.DomElement&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
                /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
                var e = Function._validateParams(arguments, [
                    {name: &lt;span class="st"&gt;&amp;quot;element&amp;quot;&lt;/span&gt;, type: Sys.UI.DomElement}
                ]);
                &lt;span class="kwd"&gt;if&lt;/span&gt; (e) &lt;span class="kwd"&gt;throw&lt;/span&gt; e;

                var offsetX = 0;
                var offsetY = 0;
                var parent;
                &lt;span class="kwd"&gt;try&lt;/span&gt; {
                    &lt;span class="kwd"&gt;for&lt;/span&gt; (parent = element; parent; parent = parent.offsetParent) {
                        &lt;span class="kwd"&gt;if&lt;/span&gt; (parent.offsetLeft) {
                            offsetX += parent.offsetLeft;
                        }
                        &lt;span class="kwd"&gt;if&lt;/span&gt; (parent.offsetTop) {
                            offsetY += parent.offsetTop;
                        }
                    }
                }
                &lt;span class="kwd"&gt;catch&lt;/span&gt;(ex) {}

                &lt;span class="kwd"&gt;return&lt;/span&gt; { x: offsetX, y: offsetY };
                };&lt;/pre&gt;&amp;nbsp;&amp;nbsp;</description></item><item><title>Re: Sys$UI$DomElement$getLocation(element) causes javascript unspecified error</title><link>http://forums.asp.net/thread/1445804.aspx</link><pubDate>Sun, 29 Oct 2006 21:32:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1445804</guid><dc:creator>steve_vci</dc:creator><author>steve_vci</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1445804.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1445804</wfw:commentRss><description>i get the same problem. the stack trace shows that ajax.net is attempting to handle an event invokation and reaches this point in order to get the location (x,y) of the dom element that raised the event. i can reproduce the error consistently but only for a single event in my application (so far) all other events work fine. for now, i just overrode the function with a try catch block around the for loop.</description></item><item><title>Re: Sys$UI$DomElement$getLocation(element) causes javascript unspecified error</title><link>http://forums.asp.net/thread/1444564.aspx</link><pubDate>Fri, 27 Oct 2006 21:12:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1444564</guid><dc:creator>vitieubao</dc:creator><author>vitieubao</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1444564.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1444564</wfw:commentRss><description>&lt;p&gt;hi Ludek.&lt;/p&gt;&lt;p&gt;I have the same problem but I am still using Atlas July build. the parent.offsetParent is null, how do you implement page script to override this method? can you explain more? I appreciate it.&lt;/p&gt;&lt;p&gt;thanks.&lt;/p&gt;</description></item><item><title>Sys$UI$DomElement$getLocation(element) causes javascript unspecified error</title><link>http://forums.asp.net/thread/1440568.aspx</link><pubDate>Wed, 25 Oct 2006 09:51:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1440568</guid><dc:creator>Ludek Trefny</dc:creator><author>Ludek Trefny</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1440568.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1440568</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;&lt;p&gt;I&amp;#39;ve just implemented ASP.NET AJAX 1.0 beta and getting the javascript unspecified error in my web application (Atlas July build works fine). I&amp;#39;d debugged&amp;nbsp;it and found following code causes the problem:&lt;/p&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;strong id="1"&gt;1    &lt;/strong&gt;Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) {
&lt;strong id="2"&gt;2    &lt;/strong&gt;    &lt;span class="cmt"&gt;/// &amp;lt;param name=&amp;quot;element&amp;quot; type=&amp;quot;Sys.UI.DomElement&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;
&lt;strong id="3"&gt;3    &lt;/strong&gt;    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
&lt;strong id="4"&gt;4    &lt;/strong&gt;    var e = Function._validateParams(arguments, [
&lt;strong id="5"&gt;5    &lt;/strong&gt;        {name: &lt;span class="st"&gt;&amp;quot;element&amp;quot;&lt;/span&gt;, type: Sys.UI.DomElement}
&lt;strong id="6"&gt;6    &lt;/strong&gt;    ]);
&lt;strong id="7"&gt;7    &lt;/strong&gt;    &lt;span class="kwd"&gt;if&lt;/span&gt; (e) &lt;span class="kwd"&gt;throw&lt;/span&gt; e;
&lt;strong id="8"&gt;8    &lt;/strong&gt;
&lt;strong id="9"&gt;9    &lt;/strong&gt;    var offsetX = 0;
&lt;strong id="10"&gt;10   &lt;/strong&gt;    var offsetY = 0;
&lt;strong id="11"&gt;11   &lt;/strong&gt;    var parent;
&lt;strong id="12"&gt;12   &lt;/strong&gt;
&lt;strong id="13"&gt;13   &lt;/strong&gt;    &lt;span class="kwd"&gt;for&lt;/span&gt; (parent = element; parent; parent = parent.offsetParent) {
&lt;strong id="14"&gt;14   &lt;/strong&gt;        &lt;span class="kwd"&gt;if&lt;/span&gt; (parent.offsetLeft) {
&lt;strong id="15"&gt;15   &lt;/strong&gt;            offsetX += parent.offsetLeft;
&lt;strong id="16"&gt;16   &lt;/strong&gt;        }
&lt;strong id="17"&gt;17   &lt;/strong&gt;        &lt;span class="kwd"&gt;if&lt;/span&gt; (parent.offsetTop) {
&lt;strong id="18"&gt;18   &lt;/strong&gt;            offsetY += parent.offsetTop;
&lt;strong id="19"&gt;19   &lt;/strong&gt;        }
&lt;strong id="20"&gt;20   &lt;/strong&gt;    }
&lt;strong id="21"&gt;21   &lt;/strong&gt;
&lt;strong id="22"&gt;22   &lt;/strong&gt;    &lt;span class="kwd"&gt;return&lt;/span&gt; { x: offsetX, y: offsetY };
&lt;strong id="23"&gt;23   &lt;/strong&gt;}
&lt;/pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;parent = parent.offsetParent causes the uspecified error at line 13 where parent.offsetParent is null. &lt;br /&gt;It might be fixed by function override in the page script. Maybe it helps someone with the same problem.&lt;/pre&gt;&lt;pre class="coloredcode"&gt;Cheers&lt;/pre&gt;&lt;pre class="coloredcode"&gt; `Ludek&lt;/pre&gt;</description></item></channel></rss>