let me try pulling back the veil so to speak... heres more code, maybe
I"m doing something more fundamentally wrong:
var Popup = Class.create(
{
        initialize: function(Container, Window, FrameDiv, Frame, Title)
        {
                this.Container = Container;
                this.Window = Window;
                this.FrameDiv = FrameDiv;
                this.Frame = Frame;
                this.Title = Title;
        },

        Show: function()
        {
                alert(window);
                Event.observe(window, 'scroll', function() { alert('hi') });
                Event.observe(window, 'resize', function() { alert('hi') });

                try
                {
                        this.Container.style.display = 'table';
                }
                catch (e)
                {
                        this.Container.style.display = '';
                }
                this.resetSizes();
        },

        Hide: function()
        {
                this.Container.style.display = 'none';
                Event.stopObserving(window, 'resize', this.resetSizes);
        },
        resetSizes: function()
        {
                var height = 0;
                var top = 0;
                var left = 0;

                if (typeof (window.innerWidth) == 'number')
                {
                        height = window.innerHeight;
                }
                else if (document.documentElement &&
(document.documentElement.clientWidth ||
document.documentElement.clientHeight))
                {
                        height = document.documentElement.clientHeight;
                }
                else if (document.body && (document.body.clientWidth ||
document.body.clientHeight))
                {
                        height = document.body.clientHeight;
                }

                if (!document.body.scrollTop)
                {
                        if (window.pageYOffset)
                                top = window.pageYOffset;
                        else
                                top = (document.body.parentElement) ?
document.body.parentElement.scrollTop : 0;
                }
                else
                        top = document.body.scrollTop;

                if (!document.body.scrollLeft)
                {
                        if (window.pageXOffset)
                                left = window.pageXOffset;
                        else
                                left = (document.body.parentElement) ?
document.body.parentElement.scrollLeft : 0;
                }
                else
                        left = document.body.scrollLeft;

                this.Container.style.top = top;
                this.Container.style.height = height + 'px';
                this.Container.style.left = left
        }
});
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to