<?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: How to display pop-up message on mouse clicked position using jQuery</title>
	<atom:link href="http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/feed" rel="self" type="application/rss+xml" />
	<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html</link>
	<description>Useful Tutorials, Scripts , Tips, and Resources for all PHP and Ajax beginners and experts .</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:10:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: vikas gautam</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-6404</link>
		<dc:creator>vikas gautam</dc:creator>
		<pubDate>Tue, 08 Feb 2011 05:08:22 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-6404</guid>
		<description>thank for the article its helpfull  for me</description>
		<content:encoded><![CDATA[<p>thank for the article its helpfull  for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: All about jQuery position and offset &#8211; Richard Choi</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-6357</link>
		<dc:creator>All about jQuery position and offset &#8211; Richard Choi</dc:creator>
		<pubDate>Mon, 31 Jan 2011 10:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-6357</guid>
		<description>[...] http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html" rel="nofollow">http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-5611</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 26 Aug 2010 02:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-5611</guid>
		<description>Hi Roshan,

I&#039;m trying to implement this into a map setting, but I can&#039;t seem to get it to work properly. I&#039;ve tried the stuff mentioned in other comments, but they don&#039;t seem to work either.

My chunk of code:

			function showPopup(id, leftbul, topbul){
				map.find(settings.popupSelector).fadeOut(); 
                   var boxid = &#039;#&#039; + id + &#039;-box&#039;;
                 $(document).click(function(e)
                 {
                   var height = &#039;400&#039;;
                   var width = &#039;275&#039;;
                   leftVal=e.pageX-(width/2)+&quot;px&quot;;
                   topVal=e.pageY-(height/2)+&quot;px&quot;; 
                   $(boxid).css({left:leftVal,top:topVal}).fadeIn(); 
        		});		
				$(settings.popupCloseSelector).click(function(){
					$(this).parent().fadeOut();
				});
			}

In my example above, you can see that it is grabbing the ID&#039;s in a special way. my id&#039;s look something like &quot;e1-box&quot;, so that isn&#039;t my issue.


When I click the anchor, it brings the popup perfectly, however after that I can&#039;t get it to STOP popping up, clicking anywhere else on the map, it brings it over to that spot. Clicking another link brings up the second link for a split second, then turns into the original popup.

Changing (document).click to (boxid).click doesn&#039;t cause any popup to show up as well. If you could promptly give me some insight, I would greatly appreciate it.</description>
		<content:encoded><![CDATA[<p>Hi Roshan,</p>
<p>I&#8217;m trying to implement this into a map setting, but I can&#8217;t seem to get it to work properly. I&#8217;ve tried the stuff mentioned in other comments, but they don&#8217;t seem to work either.</p>
<p>My chunk of code:</p>
<p>			function showPopup(id, leftbul, topbul){<br />
				map.find(settings.popupSelector).fadeOut();<br />
                   var boxid = &#8216;#&#8217; + id + &#8216;-box&#8217;;<br />
                 $(document).click(function(e)<br />
                 {<br />
                   var height = &#8217;400&#8242;;<br />
                   var width = &#8217;275&#8242;;<br />
                   leftVal=e.pageX-(width/2)+&#8221;px&#8221;;<br />
                   topVal=e.pageY-(height/2)+&#8221;px&#8221;;<br />
                   $(boxid).css({left:leftVal,top:topVal}).fadeIn();<br />
        		});<br />
				$(settings.popupCloseSelector).click(function(){<br />
					$(this).parent().fadeOut();<br />
				});<br />
			}</p>
<p>In my example above, you can see that it is grabbing the ID&#8217;s in a special way. my id&#8217;s look something like &#8220;e1-box&#8221;, so that isn&#8217;t my issue.</p>
<p>When I click the anchor, it brings the popup perfectly, however after that I can&#8217;t get it to STOP popping up, clicking anywhere else on the map, it brings it over to that spot. Clicking another link brings up the second link for a split second, then turns into the original popup.</p>
<p>Changing (document).click to (boxid).click doesn&#8217;t cause any popup to show up as well. If you could promptly give me some insight, I would greatly appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nisha</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-5499</link>
		<dc:creator>Nisha</dc:creator>
		<pubDate>Tue, 15 Jun 2010 03:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-5499</guid>
		<description>Thanks for the tip. It is very useful</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. It is very useful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Imran</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-5193</link>
		<dc:creator>Imran</dc:creator>
		<pubDate>Thu, 25 Feb 2010 06:38:06 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-5193</guid>
		<description>Hey buddy. You saved my couple of hour surely..thanks</description>
		<content:encoded><![CDATA[<p>Hey buddy. You saved my couple of hour surely..thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pligg.com</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-4942</link>
		<dc:creator>pligg.com</dc:creator>
		<pubDate>Thu, 17 Dec 2009 20:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-4942</guid>
		<description>&lt;strong&gt;Display pop-up message on mouse clicked position using jQuery...&lt;/strong&gt;

Today, I would like to share the way of handling array of HTML FORM elements using JavaScript and PHP.Well, it&#039;s very easy to get the data from the array of HTML form elements in PHP and using them but in JavaScript it&#039;s a bit tricky to handle the ar...</description>
		<content:encoded><![CDATA[<p><strong>Display pop-up message on mouse clicked position using jQuery&#8230;</strong></p>
<p>Today, I would like to share the way of handling array of HTML FORM elements using JavaScript and PHP.Well, it&#8217;s very easy to get the data from the array of HTML form elements in PHP and using them but in JavaScript it&#8217;s a bit tricky to handle the ar&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aarzman</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-4752</link>
		<dc:creator>aarzman</dc:creator>
		<pubDate>Thu, 29 Oct 2009 13:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-4752</guid>
		<description>Great script!! Is there any jquery control to stop the popup box appear out side of the window? possibly but declaring the window.innerHeight and window.innerWidth?
thanks for sharing!</description>
		<content:encoded><![CDATA[<p>Great script!! Is there any jquery control to stop the popup box appear out side of the window? possibly but declaring the window.innerHeight and window.innerWidth?<br />
thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eyveneena</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-4740</link>
		<dc:creator>Eyveneena</dc:creator>
		<pubDate>Mon, 26 Oct 2009 19:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-4740</guid>
		<description>thank you, thank you, thank you.....:)</description>
		<content:encoded><![CDATA[<p>thank you, thank you, thank you&#8230;..:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasim Padhiyar</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-4621</link>
		<dc:creator>Vasim Padhiyar</dc:creator>
		<pubDate>Fri, 25 Sep 2009 08:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-4621</guid>
		<description>your script works.
thank you for sharing</description>
		<content:encoded><![CDATA[<p>your script works.<br />
thank you for sharing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren Fauth</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-3995</link>
		<dc:creator>Darren Fauth</dc:creator>
		<pubDate>Tue, 19 May 2009 19:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-3995</guid>
		<description>Nice. I appreciate this tutorial and the good explanation in the comments about how to do this with a link...I&#039;m using a form button. Works great. Thanks!</description>
		<content:encoded><![CDATA[<p>Nice. I appreciate this tutorial and the good explanation in the comments about how to do this with a link&#8230;I&#8217;m using a form button. Works great. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asdf</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-3923</link>
		<dc:creator>asdf</dc:creator>
		<pubDate>Fri, 01 May 2009 17:22:01 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-3923</guid>
		<description>$(document).click(function(e)
{
  //getting height and width of the message box
  var height = $(&#039;#popuup_div&#039;).height();
  var width = $(&#039;#popuup_div&#039;).width();
  //calculating offset for displaying popup message
  leftVal=e.pageX-(width/2)+&quot;px&quot;;
  topVal=e.pageY-(height/2)+&quot;px&quot;;
  //show the popup message and hide with fading effect
  $(&#039;#popuup_div&#039;).css({left:leftVal,top:topVal}).show().fadeOut(1500);
});</description>
		<content:encoded><![CDATA[<p>$(document).click(function(e)<br />
{<br />
  //getting height and width of the message box<br />
  var height = $(&#8216;#popuup_div&#8217;).height();<br />
  var width = $(&#8216;#popuup_div&#8217;).width();<br />
  //calculating offset for displaying popup message<br />
  leftVal=e.pageX-(width/2)+&#8221;px&#8221;;<br />
  topVal=e.pageY-(height/2)+&#8221;px&#8221;;<br />
  //show the popup message and hide with fading effect<br />
  $(&#8216;#popuup_div&#8217;).css({left:leftVal,top:topVal}).show().fadeOut(1500);<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zany</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-3505</link>
		<dc:creator>zany</dc:creator>
		<pubDate>Tue, 27 Jan 2009 04:17:50 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-3505</guid>
		<description>This pop-up is cool ,but to disable it ,can we add some function for eg if we press outside the background or close X  or ecape key the pop-up will be disabled.Can you please help me with this???</description>
		<content:encoded><![CDATA[<p>This pop-up is cool ,but to disable it ,can we add some function for eg if we press outside the background or close X  or ecape key the pop-up will be disabled.Can you please help me with this???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nagendran</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-3281</link>
		<dc:creator>nagendran</dc:creator>
		<pubDate>Sat, 06 Dec 2008 06:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-3281</guid>
		<description>thanks for  great  code,  i want  disaplsy or past  some text   at mouse  clicked  position, only one time  ,</description>
		<content:encoded><![CDATA[<p>thanks for  great  code,  i want  disaplsy or past  some text   at mouse  clicked  position, only one time  ,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gokhan</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-3278</link>
		<dc:creator>Gokhan</dc:creator>
		<pubDate>Fri, 05 Dec 2008 12:07:02 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-3278</guid>
		<description>First thanks for the great code.
I want to use right click instead of left click is it possible?</description>
		<content:encoded><![CDATA[<p>First thanks for the great code.<br />
I want to use right click instead of left click is it possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roshan</title>
		<link>http://roshanbh.com.np/2008/08/pop-up-message-mouse-clicked-position-jquery.html/comment-page-1#comment-3100</link>
		<dc:creator>Roshan</dc:creator>
		<pubDate>Mon, 10 Nov 2008 16:40:21 +0000</pubDate>
		<guid isPermaLink="false">http://roshanbh.com.np/?p=203#comment-3100</guid>
		<description>@mohan - you can do it by having similar similar id of realted links and popups then using jquery to extract the id name when clicked and then displaying the realated popup..one script will be enough if you know the jquery</description>
		<content:encoded><![CDATA[<p>@mohan &#8211; you can do it by having similar similar id of realted links and popups then using jquery to extract the id name when clicked and then displaying the realated popup..one script will be enough if you know the jquery</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/19 queries in 0.014 seconds using disk: basic
Object Caching 400/401 objects using disk: basic

Served from: roshanbh.com.np @ 2012-02-09 06:42:28 -->
