<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.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>Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx</link><description>For some reason, there is no standard API to get the pixel coordinates of a DOM element relative to the upper-left corner of the document. APIs only exist to get coordinates relative to the offset parent. Problem is, it's very important to get those coordinates</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5954228</link><pubDate>Wed, 12 Mar 2008 02:37:19 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5954228</guid><dc:creator>Nathanael Jones</dc:creator><author>Nathanael Jones</author><description>&lt;p&gt;jQuery does a good job at it with the offset() method. I really like the way jQuery is chainable and how properties are implemented.&lt;/p&gt;
&lt;p&gt;Seriously study jQuery! I&amp;#39;ve found it to be the best, easiest, and least intrusive. &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5954228" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5927788</link><pubDate>Thu, 06 Mar 2008 17:43:26 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5927788</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@Atanas: yes, we're currently doing a test pass with the IE8 beta and we know of a few problems. getLocation is one API where we have literally thousands of test cases and where new browsers are likely to break the current code because of how tied it is to browser bug workarounds.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5927788" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5925918</link><pubDate>Thu, 06 Mar 2008 09:25:39 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5925918</guid><dc:creator>Atanas Korchev</dc:creator><author>Atanas Korchev</author><description>&lt;p&gt;Are you aware of any issues with getLocation and the recently released beta 1 of IE8? I&amp;#39;ve checked the autocomplete extender and its dropdown seems a bit off:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx"&gt;www.asp.net/.../AutoComplete.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5925918" width="1" height="1"&gt;</description></item><item><title>W&amp;ouml;chentliche Rundablage: ASP.NET, ASP.NET 3.5, ASP.NET MVC, Geocoding, WPF, WF, CardSpace, IIS7, LINQ, XNA&amp;#8230; | Code-Inside Blog</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5762108</link><pubDate>Mon, 11 Feb 2008 19:39:27 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5762108</guid><dc:creator>Wöchentliche Rundablage: ASP.NET, ASP.NET 3.5, ASP.NET MVC, Geocoding, WPF, WF, CardSpace, IIS7, LINQ, XNA… | Code-Inside Blog</dc:creator><author>Wöchentliche Rundablage: ASP.NET, ASP.NET 3.5, ASP.NET MVC, Geocoding, WPF, WF, CardSpace, IIS7, LINQ, XNA… | Code-Inside Blog</author><description>&lt;p&gt;Pingback from &amp;nbsp;W&amp;amp;ouml;chentliche Rundablage: ASP.NET, ASP.NET 3.5, ASP.NET MVC, Geocoding, WPF, WF, CardSpace, IIS7, LINQ, XNA&amp;amp;#8230; | Code-Inside Blog&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5762108" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5747365</link><pubDate>Sat, 09 Feb 2008 22:55:17 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5747365</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;Fine, seeing all the feedback I'm getting on that, I'll find a way to publish that publicly. I'll try to see if we can come up with a simplified version that would look like ACID for getLocation. Stay tuned.&lt;/p&gt;
&lt;p&gt;(technically, grabbing the screenshot involves some .NET/pInvoke wizardry, but nothing too intense, basically to get a BitMap object from any window handle and then you're in business)&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5747365" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5743397</link><pubDate>Sat, 09 Feb 2008 11:25:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5743397</guid><dc:creator>Matthias Bruch</dc:creator><author>Matthias Bruch</author><description>&lt;p&gt;Thanks for the blog entry. I really liked it to read about all that problems ... I always just did a loop through the dom to find out the coordinates, and &amp;quot;corrected&amp;quot; that by hardcoded values (for the browser differences) ... &lt;/p&gt;
&lt;p&gt;But as interesting as your post was, could you explain a little bit more how that console app does the screenshots? As I saw in the comments, I&amp;#39;m not the only one who&amp;#39;s interested in that ;-) ... &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5743397" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5715989</link><pubDate>Tue, 05 Feb 2008 18:00:58 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5715989</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;Something self-written. We wrote a .NET console app that grabs the screenshot and finds rectangles of a given color.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5715989" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5713312</link><pubDate>Tue, 05 Feb 2008 08:44:53 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5713312</guid><dc:creator>ThomasH</dc:creator><author>ThomasH</author><description>&lt;p&gt;Not quite. I was after the &amp;#39;analysis&amp;#39; part you mention. How is this performed? Are you using a tool like ImageMagic, or something self-written? How do you detect the rectangles and squares and the deviation from the expected values? &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5713312" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5688790</link><pubDate>Fri, 01 Feb 2008 20:19:38 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5688790</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;Thomas: the element we got getLocation from has a border of a specific color, and what we position absolutely to check the coordinates are two squares of a different color on the top left and bottom right. The analysis program scans the image for those rectangles and squares of specific colors. Does that answer your question?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5688790" width="1" height="1"&gt;</description></item><item><title>re: Getting absolute coordinates from a DOM element</title><link>http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx#5688733</link><pubDate>Fri, 01 Feb 2008 20:07:12 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5688733</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;Dave (infinitiesloop): I like the idea of an acid test for getLocation. By the way, our simplified version of the test that runs on every checkin does include the most pathological cases and comes close to that definition. It lacks the generality of the full test but it has the advantage that because the expected coordinates for each browser are hard coded, it doesn't need the screenshot analysis so it's much easier to run.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5688733" width="1" height="1"&gt;</description></item></channel></rss>