<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Click image and get coordinates with Javascript</title>
	<atom:link href="http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/</link>
	<description>italian geek and PROgrammer</description>
	<lastBuildDate>Sat, 11 Feb 2012 05:27:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Syteg</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-988574</link>
		<dc:creator>Syteg</dc:creator>
		<pubDate>Tue, 08 Nov 2011 09:30:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-988574</guid>
		<description>Thank you, Ottavio.

I use this script, providing by your link, it works really well. Just look at:

&lt;a href=&quot;http://www.scribd.com/doc/29158842/Get-Mouse-Position-Relative-to-Image&quot; rel=&quot;nofollow&quot;&gt;http://www.scribd.com/doc/29158842/Get-Mouse-Position-Relative-to-Image&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Thank you, Ottavio.</p>
<p>I use this script, providing by your link, it works really well. Just look at:</p>
<p><a href="http://www.scribd.com/doc/29158842/Get-Mouse-Position-Relative-to-Image" rel="nofollow">http://www.scribd.com/doc/29158842/Get-Mouse-Position-Relative-to-Image</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeba</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-981860</link>
		<dc:creator>jeba</dc:creator>
		<pubDate>Tue, 01 Nov 2011 10:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-981860</guid>
		<description>Thank you ,
It was helpful</description>
		<content:encoded><![CDATA[<p>Thank you ,<br />
It was helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jessica</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-971302</link>
		<dc:creator>Jessica</dc:creator>
		<pubDate>Thu, 20 Oct 2011 09:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-971302</guid>
		<description>Great this posting...!
But I have Problem,
how about if i show the image in
div pan tag that has resolution 500x500 pixel in style.css
the image has resolution 800x800
so the image just show in 500x500
but it can move to right, left up and down with pan control.

the problem is
when i click image just show coordinates in max 500x500
but the image has resolution 800x800
has any ideas??





		
You pointed on x =  - y = 



and style.css
#pan :{
	border: #dddddd 1px solid;
	width: 500px;
	height: 500px;
	overflow: hidden;
}

the code is work but the coordinates
X and Y is just in div pan with max 500x500 pixel</description>
		<content:encoded><![CDATA[<p>Great this posting&#8230;!<br />
But I have Problem,<br />
how about if i show the image in<br />
div pan tag that has resolution 500&#215;500 pixel in style.css<br />
the image has resolution 800&#215;800<br />
so the image just show in 500&#215;500<br />
but it can move to right, left up and down with pan control.</p>
<p>the problem is<br />
when i click image just show coordinates in max 500&#215;500<br />
but the image has resolution 800&#215;800<br />
has any ideas??</p>
<p>You pointed on x =  &#8211; y = </p>
<p>and style.css<br />
#pan :{<br />
	border: #dddddd 1px solid;<br />
	width: 500px;<br />
	height: 500px;<br />
	overflow: hidden;<br />
}</p>
<p>the code is work but the coordinates<br />
X and Y is just in div pan with max 500&#215;500 pixel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nikolas</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-856035</link>
		<dc:creator>nikolas</dc:creator>
		<pubDate>Sat, 18 Jun 2011 03:45:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-856035</guid>
		<description>Thanx great example</description>
		<content:encoded><![CDATA[<p>Thanx great example</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mehdi</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-847405</link>
		<dc:creator>Mehdi</dc:creator>
		<pubDate>Mon, 06 Jun 2011 07:23:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-847405</guid>
		<description>Thank you , 
It was helpful</description>
		<content:encoded><![CDATA[<p>Thank you ,<br />
It was helpful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toys online</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-841797</link>
		<dc:creator>toys online</dc:creator>
		<pubDate>Fri, 27 May 2011 04:22:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-841797</guid>
		<description>This is brilliant. How would I determine the co-ordinates of different areas of an image to use coords?</description>
		<content:encoded><![CDATA[<p>This is brilliant. How would I determine the co-ordinates of different areas of an image to use coords?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hao Zhe XU</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-835893</link>
		<dc:creator>Hao Zhe XU</dc:creator>
		<pubDate>Tue, 17 May 2011 08:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-835893</guid>
		<description>This is wonderful, however, does it still work if I view the website of the image in a mobile phone browser and pinched to zoom it in/out?

Thanks!</description>
		<content:encoded><![CDATA[<p>This is wonderful, however, does it still work if I view the website of the image in a mobile phone browser and pinched to zoom it in/out?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomblin</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-819967</link>
		<dc:creator>Thomblin</dc:creator>
		<pubDate>Mon, 25 Apr 2011 18:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-819967</guid>
		<description>Thanks a lot, helped me very much, but I used the version of Farit (on July 14, 2007 at 11:51 pm) like this

      var pos_x = 0;
      var pos_y = 0;
      function get_click_coords(event)
      {
        var pointer_div = document.getElementById(&#039;captcha&#039;);

        // IE
        if (window.ActiveXObject)
        {
          pos_x = window.event.offsetX;
          pos_y = window.event.offsetY;
        }
        // Firefox
        else
        {
          var top = 0, left = 0;
          var elm = pointer_div;
          while (elm)
          {
            left += elm.offsetLeft;
            top += elm.offsetTop;
            elm = elm.offsetParent;
          }

          pos_x = event.pageX - left;
          pos_y = event.pageY - top;
        }
      }</description>
		<content:encoded><![CDATA[<p>Thanks a lot, helped me very much, but I used the version of Farit (on July 14, 2007 at 11:51 pm) like this</p>
<p>      var pos_x = 0;<br />
      var pos_y = 0;<br />
      function get_click_coords(event)<br />
      {<br />
        var pointer_div = document.getElementById(&#8216;captcha&#8217;);</p>
<p>        // IE<br />
        if (window.ActiveXObject)<br />
        {<br />
          pos_x = window.event.offsetX;<br />
          pos_y = window.event.offsetY;<br />
        }<br />
        // Firefox<br />
        else<br />
        {<br />
          var top = 0, left = 0;<br />
          var elm = pointer_div;<br />
          while (elm)<br />
          {<br />
            left += elm.offsetLeft;<br />
            top += elm.offsetTop;<br />
            elm = elm.offsetParent;<br />
          }</p>
<p>          pos_x = event.pageX &#8211; left;<br />
          pos_y = event.pageY &#8211; top;<br />
        }<br />
      }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasim Padhiyar</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-816571</link>
		<dc:creator>Vasim Padhiyar</dc:creator>
		<pubDate>Tue, 19 Apr 2011 16:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-816571</guid>
		<description>Thanks for post...</description>
		<content:encoded><![CDATA[<p>Thanks for post&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomas</title>
		<link>http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-815689</link>
		<dc:creator>Tomas</dc:creator>
		<pubDate>Mon, 18 Apr 2011 09:25:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/09/02/click-image-and-get-coordinates-with-javascript/#comment-815689</guid>
		<description>Hello there, 

Thank you very much. Very helpful &amp; useful. As for the pointer bug. Here is the solution:

document.getElementById(&quot;cross&quot;).style.left = (pos_x-1).toString() + &quot;px&quot; ;
	document.getElementById(&quot;cross&quot;).style.top = (pos_y-15).toString()  + &quot;px&quot;;</description>
		<content:encoded><![CDATA[<p>Hello there, </p>
<p>Thank you very much. Very helpful &amp; useful. As for the pointer bug. Here is the solution:</p>
<p>document.getElementById(&#8220;cross&#8221;).style.left = (pos_x-1).toString() + &#8220;px&#8221; ;<br />
	document.getElementById(&#8220;cross&#8221;).style.top = (pos_y-15).toString()  + &#8220;px&#8221;;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 5/11 queries in 0.017 seconds using disk: basic

Served from: www.emanueleferonato.com @ 2012-02-11 13:12:06 -->
