I missed it.
I'm using prototype 1.6.1.RC3.

On 7월1일, 오후6시08분, serenobs <[email protected]> wrote:
> Hi again :)
>
> I'm new to prototype, javascript and I got many problems
> so please understand my bunch of questions :)
>
> Here is my question.
> I'd like to replace my div when window resized.
> I coded like below:
> <script>
> function onBodyLoad() {
>     var onResize = function(e) {
>         var viewport = document.viewport.getDimensions();
>         var screen = $('screen');
>         var s_view = screen.getDimensions();
>
>         screen.style.positon = 'absolute';
>         screen.style.left = (viewport.width - s_view.width)/2+'px';
>         screen.style.top = (viewport.height - s_view.height)/2+'px';
>     };
>
>     Element.observe(window, 'resize', onResize);};
>
> </script>
> <body onLoad="new onBodyLoad()">
>
> I can see onResize was called.
> But IE, viewport.width returns 0, and FF returns right number.
> and both screen element doesn't move its position.
>
> What's wrong with above code?
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to