Hi, I was working with it and it doesn't seem to work at all. It returns 36 all the time for some reason as the viewport height, which clearly isn't the case. Are there known issues with this method?
The code is the following: <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/ prototype.js"></script> <script type="text/javascript"> document.observe('dom:loaded', function(){ $('bang').observe('click', function(){ alert('cumulativeOffset (left, top): ' + $('foo').cumulativeOffset() + '\n' + 'viewportDimensions (width, height): ' + document.viewport.getDimensions().width + ', ' + document.viewport.getDimensions().height); }); }); </script> </head> <body> <input id="bang" type="button" value="test!"/> <div id="foo" style="border:2px solid red; position:absolute; top: 1000px; left:1000px"> Test </div> </body> </html> Any help appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---