Getting absolute coordinates from a DOM element

Posted by: More Whidbey stuff, on 30 Jan 2008 | View original | Bookmarked: 0 time(s)

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 for applications such as drag and drop, or whenever you need to compare coordinates of elements that may be in completely different parts of the document. In Microsoft Ajax, we implemented such a function but it proved to be one of the most...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: JavaScript | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1070 | Hits: 35

Similar Posts

  • Adding users to a TFS project when youre not on the domain more
  • From LINQ to XPath and Back Again more
  • Making Element Position Absolute with jQuery more
  • jQuery.position() on Invisible Elements fails more
  • Showing "tooltips" for the nested RadGridView in RadMultiColumnComboBox more
  • JavaScript >> Get Any CSS Property Value of an Object using $style more
  • $style - Get Any CSS Property Value of an Object more
  • Beware the $(...) in jQuery: $("#elementId") != document.getElementById("elementId") more
  • Data bound fields for Ajax forms more
  • Object Thinking Domain Model Example more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD