<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>Dang! That's cool. I was hoping the callbacks would return something for "#html:". Thanks for the help! Ill play around with it when I get home.<br><br>So "#text:" doesn't expect the same thing as "#html:" then?<br><br>Oh, also. I recall a comment somewhere that you can only register one callback on a class? Does that only apply to seaside components?<br><br>Thanks!<br>RS<br><br>> Date&#58; Tue, 22 Sep 2009 19&#58;20&#58;54 &#43;0200<br>> Subject&#58; Re&#58; &#91;Seaside&#93; Detect the position of a page div<br>> From&#58; renggli&#64;gmail.com<br>> To&#58; seaside&#64;lists.squeakfoundation.org<br>> <br>> There is a bit too much nested AJAX going on for me &#59;-&#41;<br>> <br>> &#62; &#160;&#160;&#160; &#160;&#160;&#160; script&#58; &#40;&#40;html jQuery new draggable&#41; onDrag&#58; &#40;<br>> &#62;<br>> &#62; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#40;html jQuery ajax script&#58; &#91;&#58;s &#124; s add&#58; &#40;&#40;s jQuery&#58; &#35;bobLeft&#41;<br>> &#62; html&#58; &#40;s jQuery ajax callback&#58; &#91;&#40;s jQuery&#58; &#35;bob&#41; offset access&#58; &#39;left&#39;&#93;&#41;&#41;&#93;&#41;,<br>> &#62; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#40;html jQuery ajax script&#58; &#91;&#58;s &#124; s add&#58; &#40;&#40;s jQuery&#58; &#35;bobTop&#41;<br>> &#62; html&#58; &#40;s jQuery ajax callback&#58; &#91;&#40;s jQuery&#58; &#35;bob&#41; offset access&#58; &#39;top&#39;&#93;&#41;&#41;&#93;&#41;<br>> &#62;<br>> &#62; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#41;<br>> &#62; &#160;&#160;&#160; &#160;&#160;&#160; &#41;&#59;<br>> <br>> The message &#35;html&#58; expects aRenderable, such as a block or a string of<br>> HTML, something that is generated by Seaside on the server. In your<br>> case you just display the script and that is what you see in the<br>> browser.<br>> <br>> If you replace &#35;html with &#35;text&#58; and remove the roundtrip to the<br>> server this should already work&#58;<br>> <br>>   &#40;html jQuery ajax script&#58; &#91;&#58;s &#124; s add&#58; &#40;&#40;s jQuery&#58; &#35;bobLeft&#41; text&#58;<br>> &#40;&#40;s jQuery&#58; &#35;bob&#41; offset access&#58; &#39;left&#39;&#41;&#41;&#93;&#41;,<br>>   &#40;html jQuery ajax script&#58; &#91;&#58;s &#124; s add&#58; &#40;&#40;s jQuery&#58; &#35;bobTop&#41; text&#58;<br>> &#40;&#40;s jQuery&#58; &#35;bob&#41; offset access&#58; &#39;top&#39;&#41;&#41;&#93;&#41;<br>> <br>> Now it displays the coordinates, but very much delayed as the script<br>> makes two round-trips to the server whenever you move the draggable<br>> element. In fact, this round-trip is not needed at all. If you remove<br>> all AJAX code the script becomes much simpler and faster. Furthermore,<br>> if you use the navigation facilities of jQuery you don&#39;t need any of<br>> the IDs and the script becomes&#58;<br>> <br>> html div<br>> &#9;script&#58; &#40;html jQuery new draggable onDrag&#58;<br>> &#9;&#9;&#40;&#40;html jQuery this find&#58; &#39;&#58;first&#39;&#41; text&#58; &#40;html jQuery this offsetLeft&#41;&#41; ,<br>> &#9;&#9;&#40;&#40;html jQuery this find&#58; &#39;&#58;last&#39;&#41; text&#58; &#40;html jQuery this offsetTop&#41;&#41;&#41;&#59;<br>> &#9;with&#58; &#91; html div&#58; &#39;left&#39;&#59; div&#58; &#39;top&#39; &#93;<br>> <br>> Note, I use &#35;offsetLeft and &#35;offsetTop here, two methods I added to<br>> jQuery this morning after your post. You might want to update to the<br>> latest code, or replace the calls with the old code  &#35;access&#58;<br>> <br>> Cheers,<br>> Lukas<br>> <br>> -- <br>> Lukas Renggli<br>> http&#58;&#47;&#47;www.lukas-renggli.ch<br>> _______________________________________________<br>> seaside mailing list<br>> seaside&#64;lists.squeakfoundation.org<br>> http&#58;&#47;&#47;lists.squeakfoundation.org&#47;cgi-bin&#47;mailman&#47;listinfo&#47;seaside<br><br /><hr />Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. <a href='http://clk.atdmt.com/GBL/go/171222985/direct/01/' target='_new'>Sign up now.</a></body>
</html>