0

I use a screenshot tool like SnagIt and this tool is able to make a screenshot of a specific element inside a website. I tried this feature with firefox, safari and ie, all runs fine. When I use the mouse pointer to aim an element, SnagIt shows a red box around the hovered element in the browser. For example, this tool knows the exact coordinates of a div or img element.

What is the technique behind this feature? Is there a common way for every browser? I've already used Spy++ to get the window handles, unfortunately this isn't the resolution.

I'm in a project in which I need this feature for different browsers.

Thank you very much, Mark

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Mark
  • 1

1 Answers1

-1

If you want to know the x,y coordinates of any element in javascript, Then I suggest you use jquery [http://jquery.com] on your page and use its offset function.

Coffee Bite
  • 4,956
  • 5
  • 33
  • 38
  • This site I want to analyse is not my own. So I can't integrate jquery into this site, can I? – Mark Jul 31 '10 at 16:15