<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'determining mouse position' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'determining mouse position' posted on the 'JavaScript' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 01:12:32 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 01:12:32 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>determining mouse position</title>
      <link>http://www.programmersheaven.com/mb/java-script/145663/145663/determining-mouse-position/</link>
      <description>I want to create a popup window on the position of the mouse. I want to use this for a popup menu. Something like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
&amp;lt;img onMouseOver="Popup(this)"&amp;gt;

&amp;lt;script Language="JavaScript"&amp;gt;
&amp;lt;!--
  function Popup(obj) {
    win = window.open('','','left:'+obj.left+';top:'+obj.top
+';dependent;');
  }
//--&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Do You get what I mean ?&lt;br /&gt;
(ofcourse the code above does not work!)&lt;br /&gt;
I'd also like to get rid of the titlebar of the popup window, so that the users won't see it as the popupwindow but as a popupmenu...&lt;br /&gt;
&lt;br /&gt;
can anyone help me with that ?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://www.programmersheaven.com/images/Community/twink.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
-mac-&lt;br /&gt;
mailto:programmersheaven@mac-doggie.nl&lt;br /&gt;
the Netherlands...&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/145663/145663/determining-mouse-position/</guid>
      <pubDate>Wed, 16 Oct 2002 01:40:33 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: determining mouse position</title>
      <link>http://www.programmersheaven.com/mb/java-script/145663/145963/re-determining-mouse-position/#145963</link>
      <description>: I want to create a popup window on the position of the mouse. I want to use this for a popup menu. Something like:&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: &amp;lt;img onMouseOver="Popup(this)"&amp;gt;
: 
: &amp;lt;script Language="JavaScript"&amp;gt;
: &amp;lt;!--
:   function Popup(obj) {
:     win = window.open('','','left:'+obj.left+';top:'+obj.top
+';dependent;');
:   }
: //--&amp;gt;
: &amp;lt;/script&amp;gt;
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: Do You get what I mean ?&lt;br /&gt;
: (ofcourse the code above does not work!)&lt;br /&gt;
: I'd also like to get rid of the titlebar of the popup window, so that the users won't see it as the popupwindow but as a popupmenu...&lt;br /&gt;
: &lt;br /&gt;
: can anyone help me with that ?&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;img src="http://www.programmersheaven.com/images/Community/twink.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
: -mac-&lt;br /&gt;
: mailto:programmersheaven@mac-doggie.nl&lt;br /&gt;
: the Netherlands...&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Hi there,&lt;br /&gt;
&lt;br /&gt;
Yep I understand what you're trying to do.&lt;br /&gt;
&lt;br /&gt;
There's no way to actually remove the pop-up's Title bar. The only time the title bar is not present is during full screen mode in IE. NS still retains the title bar.&lt;br /&gt;
&lt;br /&gt;
So your only other way to do it is to use &amp;lt;DIV&amp;gt;'s.&lt;br /&gt;
&lt;br /&gt;
It also depends upon which browser you're trying to develop for.&lt;br /&gt;
&lt;br /&gt;
window.event.x and window.event.y give you the precise mouse coordinates. In your popup code, you can use these two to get where the mouse is when the function is fired.&lt;br /&gt;
&lt;br /&gt;
HTH&lt;br /&gt;
Bradley q:)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/145663/145963/re-determining-mouse-position/#145963</guid>
      <pubDate>Wed, 16 Oct 2002 22:02:49 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: determining mouse position</title>
      <link>http://www.programmersheaven.com/mb/java-script/145663/145979/re-determining-mouse-position/#145979</link>
      <description>: : I want to create a popup window on the position of the mouse. I want to use this for a popup menu. Something like:&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;pre class="sourcecode"&gt;
: : &amp;lt;img onMouseOver="Popup(this)"&amp;gt;
: : 
: : &amp;lt;script Language="JavaScript"&amp;gt;
: : &amp;lt;!--
: :   function Popup(obj) {
: :     win = window.open('','','left:'+obj.left+';top:'+obj.top
+';dependent;');
: :   }
: : //--&amp;gt;
: : &amp;lt;/script&amp;gt;
: : &lt;/pre&gt;&lt;br /&gt;
: : &lt;br /&gt;
: : Do You get what I mean ?&lt;br /&gt;
: : (ofcourse the code above does not work!)&lt;br /&gt;
: : I'd also like to get rid of the titlebar of the popup window, so that the users won't see it as the popupwindow but as a popupmenu...&lt;br /&gt;
: : &lt;br /&gt;
: : can anyone help me with that ?&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: : &lt;img src="http://www.programmersheaven.com/images/Community/twink.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
: : -mac-&lt;br /&gt;
: : mailto:programmersheaven@mac-doggie.nl&lt;br /&gt;
: : the Netherlands...&lt;br /&gt;
: : &lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: Hi there,&lt;br /&gt;
: &lt;br /&gt;
: Yep I understand what you're trying to do.&lt;br /&gt;
: &lt;br /&gt;
: There's no way to actually remove the pop-up's Title bar. The only time the title bar is not present is during full screen mode in IE. NS still retains the title bar.&lt;br /&gt;
: &lt;br /&gt;
: So your only other way to do it is to use &amp;lt;DIV&amp;gt;'s.&lt;br /&gt;
: &lt;br /&gt;
: It also depends upon which browser you're trying to develop for.&lt;br /&gt;
: &lt;br /&gt;
: window.event.x and window.event.y give you the precise mouse coordinates. In your popup code, you can use these two to get where the mouse is when the function is fired.&lt;br /&gt;
: &lt;br /&gt;
: HTH&lt;br /&gt;
: Bradley q:)&lt;br /&gt;
: &lt;br /&gt;
Thanks for your reply. I thought that I did see explorerwindows without titelbar, but I guess I'm wrong then. I thought of &amp;lt;DIV&amp;gt;'s too, but if I am using frames De popup menu won't appear over the other frame, it just creates a scrollbar in it's own frame (know what I mean?) If anyone can figure out a way to get rid of the titelbar please let me know... (I could allways create my own browser in VB hihi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://www.programmersheaven.com/images/Community/twink.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
-mac-&lt;br /&gt;
mailto:programmersheaven@mac-doggie.nl&lt;br /&gt;
the Netherlands...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/145663/145979/re-determining-mouse-position/#145979</guid>
      <pubDate>Thu, 17 Oct 2002 00:40:12 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: determining mouse position</title>
      <link>http://www.programmersheaven.com/mb/java-script/145663/147776/re-determining-mouse-position/#147776</link>
      <description>: I want to create a popup window on the position of the mouse. I want to use this for a popup menu. Something like:&lt;br /&gt;
: &lt;br /&gt;
: &lt;pre class="sourcecode"&gt;
: &amp;lt;img onMouseOver="Popup(this)"&amp;gt;
: 
: &amp;lt;script Language="JavaScript"&amp;gt;
: &amp;lt;!--
:   function Popup(obj) {
:     win = window.open('','','left:'+obj.left+';top:'+obj.top
+';dependent;');
:   }
: //--&amp;gt;
: &amp;lt;/script&amp;gt;
: &lt;/pre&gt;&lt;br /&gt;
: &lt;br /&gt;
: Do You get what I mean ?&lt;br /&gt;
: (ofcourse the code above does not work!)&lt;br /&gt;
: I'd also like to get rid of the titlebar of the popup window, so that the users won't see it as the popupwindow but as a popupmenu...&lt;br /&gt;
: &lt;br /&gt;
: can anyone help me with that ?&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;img src="http://www.programmersheaven.com/images/Community/twink.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;
: -mac-&lt;br /&gt;
: mailto:programmersheaven@mac-doggie.nl&lt;br /&gt;
: the Netherlands...&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Hey there is a better way to do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;img name="dsasdads" onMouseDown="your_func(this.name)"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
function your_func(name){&lt;br /&gt;
  //name is the image name&lt;br /&gt;
  // mouse coordinates are &lt;br /&gt;
var mx=event.clientX;&lt;br /&gt;
var my=event.clientY;&lt;br /&gt;
    window.open("whereyougo.htm?mouseX="+mx+"&amp;amp;MouseY="
+my,"","locationbar=no,toolbar=no,status=no");&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the function mx,my are mouse coordinates; name are the image name;&lt;br /&gt;
if you want to catch on mouse move event simply change onMouseDown=... with onMouseMove.&lt;br /&gt;
Note: this will work only IE.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/145663/147776/re-determining-mouse-position/#147776</guid>
      <pubDate>Thu, 24 Oct 2002 03:45:49 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: determining mouse position</title>
      <link>http://www.programmersheaven.com/mb/java-script/145663/147996/re-determining-mouse-position/#147996</link>
      <description>: Hey there is a better way to do this:&lt;br /&gt;
: &lt;br /&gt;
: &amp;lt;img name="dsasdads" onMouseDown="your_func(this.name)"&amp;gt;&lt;br /&gt;
: &lt;br /&gt;
: &amp;lt;script&amp;gt;&lt;br /&gt;
: function your_func(name){&lt;br /&gt;
:   //name is the image name&lt;br /&gt;
:   // mouse coordinates are &lt;br /&gt;
: var mx=event.clientX;&lt;br /&gt;
: var my=event.clientY;&lt;br /&gt;
:     window.open("whereyougo.htm?mouseX="+mx+"&amp;amp;MouseY="
+my,"","locationbar=no,toolbar=no,status=no");&lt;br /&gt;
: }&lt;br /&gt;
: &amp;lt;/script&amp;gt;&lt;br /&gt;
: &lt;br /&gt;
: in the function mx,my are mouse coordinates; name are the image name;&lt;br /&gt;
: if you want to catch on mouse move event simply change onMouseDown=... with onMouseMove.&lt;br /&gt;
: Note: this will work only IE.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
window.event.x and window.event.y works in both IE4+ &amp;amp; NS4+&lt;br /&gt;
&lt;br /&gt;
Cya&lt;br /&gt;
Bradley q:)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/145663/147996/re-determining-mouse-position/#147996</guid>
      <pubDate>Thu, 24 Oct 2002 16:54:03 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: determining mouse position</title>
      <link>http://www.programmersheaven.com/mb/java-script/145663/148040/re-determining-mouse-position/#148040</link>
      <description>: : Hey there is a better way to do this:&lt;br /&gt;
: : &lt;br /&gt;
: : &amp;lt;img name="dsasdads" onMouseDown="your_func(this.name)"&amp;gt;&lt;br /&gt;
: : &lt;br /&gt;
: : &amp;lt;script&amp;gt;&lt;br /&gt;
: : function your_func(name){&lt;br /&gt;
: :   //name is the image name&lt;br /&gt;
: :   // mouse coordinates are &lt;br /&gt;
: : var mx=event.clientX;&lt;br /&gt;
: : var my=event.clientY;&lt;br /&gt;
: :     window.open("whereyougo.htm?mouseX="+mx+"&amp;amp;MouseY="
+my,"","locationbar=no,toolbar=no,status=no");&lt;br /&gt;
: : }&lt;br /&gt;
: : &amp;lt;/script&amp;gt;&lt;br /&gt;
: : &lt;br /&gt;
: : in the function mx,my are mouse coordinates; name are the image name;&lt;br /&gt;
: : if you want to catch on mouse move event simply change onMouseDown=... with onMouseMove.&lt;br /&gt;
: : Note: this will work only IE.&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: window.event.x and window.event.y works in both IE4+ &amp;amp; NS4+&lt;br /&gt;
: &lt;br /&gt;
: Cya&lt;br /&gt;
: Bradley q:)&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
Hi Cya,&lt;br /&gt;
You are completely right, but problem is to determine the exact mouse position in the object. Calculation that you must make on this way is more than you only determine browser and then you take the mouse position.&lt;br /&gt;
&lt;br /&gt;
Regards &lt;br /&gt;
Borislav&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/145663/148040/re-determining-mouse-position/#148040</guid>
      <pubDate>Thu, 24 Oct 2002 22:47:02 -0700</pubDate>
      <category>JavaScript</category>
    </item>
  </channel>
</rss>