T.J. Crowder wrote:
> Hi,
> 
> Ajax.Updater is (by default) *asynchronous*, so your code doing the
> resizing runs before the request completes.  Use an onSuccess handler
> [1] instead.  (Don't just make the request synchronous, it locks up
> the browser UI.)  You might also find the "bulletproof ajax requests"
> page[2] on the unofficial wiki useful.

I actually tried onSuccess before, and had the same results.  Is this
the correct syntax?

   new Ajax.Updater('hoverdiv', 'getinfo.php?pass_id=' + passid, {
                    method: 'get',
                    onSuccess: function() {
                           var myOff = myItem.cumulativeOffset();

                           var newX = myOff[0] + (myItem.getWidth() - 
myDiv.getWidth()) / 2;
                           var newY = myOff[1] + (myItem.getHeight() - 
myDiv.getHeight()) / 2;

                           myDiv.style.top = newY + 'px';
                           myDiv.style.left = newX + 'px';

                           myDiv.appear();
                                          }
                   });


Thanks for the link to the unofficial wiki, looks quite useful.

> HTH,
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available

-- 
---------------------------
Jason Frisvold
xenopha...@gmail.com
---------------------------
"I love deadlines. I like the whooshing sound they make as they fly by."
   - Douglas Adams

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to