<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Ugh, I give up. For some reason this is easy to do in Prototype, but I can't figure it out at all in jQuery...<br><br>What I'd like to do is get the position of the mouse (http://docs.jquery.com/Types/Event#event.pageX.2FY) and send the value to an ajax callback like below:<br><br>...<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onClick: (html jQuery ajax<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; callback: [:v | self session mousePosTop: v ] value: 'y val';<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; callback: [:v | self session mousePosLeft: v ] value: 'x val'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>...<br><br>Near as I can tell, in PT you have access to the actual event parameter via the PTEvent class, which doesn't seem to exist in jQ, but the part I'm confused about is that both implement #call:with: on JSObject, but I guess the JavaScript libraries respond differently.<br><br>jQuery uses pageX/pageY quite extensively (especially UI), so I would think they would have a function returning those values?<br><br>Thanks,<br>RS<br><br>&gt; From: renggli@gmail.com<br>&gt; Date: Fri, 2 Apr 2010 20:19:24 +0200<br>&gt; Subject: Re: [Seaside] Image Zoomer: How to capture mouseOver X &amp; Y<br>&gt; To: seaside@lists.squeakfoundation.org<br>&gt; <br>&gt; &gt; How do you get the offset from the window or client?<br>&gt; <br>&gt; window.left<br>&gt; window.top<br>&gt; <br>&gt; Lukas<br>&gt; <br>&gt; <br>&gt; &gt;<br>&gt; &gt; RS<br>&gt; &gt;<br>&gt; &gt;&gt; From: renggli@gmail.com<br>&gt; &gt;&gt; Date: Fri, 19 Mar 2010 08:23:57 +0100<br>&gt; &gt;&gt; Subject: Re: [Seaside] Image Zoomer: How to capture mouseOver X &amp; Y<br>&gt; &gt;&gt; To: seaside@lists.squeakfoundation.org<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt; This works nicely but I haven't been able to work out to to pass the<br>&gt; &gt;&gt; &gt; relative X &amp; Y positions from the mouseover on the original image into<br>&gt; &gt;&gt; &gt; the cssClippedPosition method.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; What Javascript library are you using?<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; For jQuery:<br>&gt; &gt;&gt; http://www.electrictoolbox.com/jquery-mouse-co-ordinates-mouseover-click-within-element/<br>&gt; &gt;&gt; In General:<br>&gt; &gt;&gt; http://www.google.ch/search?q=mouse+coordinates+relative+to+element<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Lukas<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; --<br>&gt; &gt;&gt; Lukas Renggli<br>&gt; &gt;&gt; http://www.lukas-renggli.ch<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; seaside mailing list<br>&gt; &gt;&gt; seaside@lists.squeakfoundation.org<br>&gt; &gt;&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.<br>&gt; &gt; Learn more.<br>&gt; &gt; _______________________________________________<br>&gt; &gt; seaside mailing list<br>&gt; &gt; seaside@lists.squeakfoundation.org<br>&gt; &gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>&gt; &gt;<br>&gt; &gt;<br>&gt; <br>&gt; <br>&gt; <br>&gt; -- <br>&gt; Lukas Renggli<br>&gt; www.lukas-renggli.ch<br>&gt; _______________________________________________<br>&gt; seaside mailing list<br>&gt; seaside@lists.squeakfoundation.org<br>&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br>                                               <br /><hr />The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. <a href='http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4' target='_new'>Get busy.</a></body>
</html>