[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-06 Thread Szymon Wilkołazki
Bertrand wrote: > Thanks for your kind answer, it did help a lot. It should help, as it tells you are looking for the problem in wrong place. Try to look for the problem in your own code and not blame prototype.js when you're not sure. I think the problem you might have is the lack of DOCTYPE

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Alex McAuley
your welcome.. please dont top the messages on the group as it makes it harder to know what response you are replying to - Original Message - From: "Bertrand" To: "Prototype & script.aculo.us" Sent: Tuesday, May 05, 2009 8:32 PM Sub

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
Thanks for your kind answer, it did help a lot. --~--~-~--~~~---~--~~ 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 uns

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Alex McAuley
It works fine for me on all browsers every time ... - Original Message - From: "Bertrand" To: "Prototype & script.aculo.us" Sent: Tuesday, May 05, 2009 7:13 PM Subject: [Proto-Scripty] Re: document.viewport.getDimensions() not working > > After some

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
After some research online, it seems that Andrew Dupont's version (found at http://andrewdupont.net/2006/09/09/viewport-dimensions-in-javascript/) seems to work better for me. Hope it helps. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
An additional piece of information: I tried version 1.6.1rc2 and it doesn't seem to work on IE8 either. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-05 Thread Bertrand
I forgot an important piece of information. It seems to work perfectly fine with Safari 3.2.1 on MacOSX but not on Firefox 3.0.10 on the same OS (which isn't that bad after all, but I figured I'd let you know). On May 5, 10:36 am, Bertrand wrote: > Hi, > > I was working with it and it doesn't se

[Proto-Scripty] Re: document.viewport.getDimensions

2009-01-26 Thread Alex K
JFYI - Upgrade from 1.6.0.1 to 1.6.0.3 solved the issue. On Jan 24, 10:28 pm, Alex K wrote: > Ok, here you are: > > //inside some class... > > this.on_resize_ = this.on_resize.bindAsEventListener(this); > Event.observe(window,'resize',this.on_resize_); > > on_resize: function(e){ >     var d = d

[Proto-Scripty] Re: document.viewport.getDimensions

2009-01-24 Thread Alex K
Ok, here you are: //inside some class... this.on_resize_ = this.on_resize.bindAsEventListener(this); Event.observe(window,'resize',this.on_resize_); on_resize: function(e){ var d = document.viewport.getDimensions(); $('header').innerHTML = ' width: '+d.width+' height: '+d.height; } //

[Proto-Scripty] Re: document.viewport.getDimensions

2009-01-24 Thread T.J. Crowder
> The code snippet is obvious so I'm pretty sure that it's not my typo > or something And yet, it's ALWAYS a good idea to include the code you're having trouble with -- and in particular, include the context in which you're using that code. Inline code? dom:loaded event? onload event? Other ev

[Proto-Scripty] Re: document.viewport.getDimensions()

2008-11-03 Thread michael . j . cannon
Thanks, TJ. That was it. Quirks mode BAD. - Mike On Nov 3, 2008 4:44am, "TJ Crowder" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > Sorry! I see that you said you *are* using 1.6.0.3. > > > > Do you have a doctype on your document? As far as I know, Prototype > > basically doesn't support quirk

[Proto-Scripty] Re: document.viewport.getDimensions()

2008-11-03 Thread T.J. Crowder
Hi, Sorry! I see that you said you *are* using 1.6.0.3. Do you have a doctype on your document? As far as I know, Prototype basically doesn't support quirks mode. Here's my test page where I get the expected results on IE6, FF3, Safari3, and Opera9 (on Windows), perhaps it will help you diagn

[Proto-Scripty] Re: document.viewport.getDimensions()

2008-11-03 Thread T.J. Crowder
Hi, I'm not seeing this behavior with Prototype 1.6.0.3. Are you using an older version? -- T.J. Crowder tj / crowder software / com On Nov 1, 11:13 pm, Mike <[EMAIL PROTECTED]> wrote: > Hi, > > If at the end of my onload handler I put: > >   alert('document.viewport.getWidth/Height(): ' + >