[Proto-Scripty] Re: Why does document.viewport.getDimensions() not work without a DOCTYPE?

2009-06-08 Thread Walter Lee Davis

Without a DOCTYPE, it's not valid, not in any flavor of HTML in modern- 
day use.

Walter

On Jun 8, 2009, at 2:31 PM, Paul Kim wrote:

> I guess this mean that I must use DOCTYPES when using Prototype.  I  
> was expecting Prototype to work consistently whether or not there  
> was a DOCTYPE present.
>
> - Paul
>
> On Mon, Jun 8, 2009 at 11:07 AM, Alex McAuley 
>  > wrote:
>
> This has been discussed many times before .. if i recall correctly its
> somehting to do with Quirksmode
>
> HTH
>
> Alex
> - Original Message -
> From: "kimbaudi" 
> To: "Prototype & script.aculo.us"  >
> Sent: Monday, June 08, 2009 5:58 PM
> Subject: [Proto-Scripty] Why does document.viewport.getDimensions()  
> not work
> without a DOCTYPE?
>
>
> >
> > Hi, I have taken a look at the Prototype API and it says that
> > document.viewport.getDimensions() should return the size of the
> > viewport. I have created a simple page with a  with width of
> > 100px and height of 100px.  I am hoping to alert the height of the
> > browser window, but I get the height of the div. I didn't understand
> > why the height of the div got alerted instead of the browser window.
> > It appears that I needed to add a DOCTYPE in order for
> > document.viewport.getDimensions() to work properly. Can anybody
> > explain why the DOCTYPE is required for Prototype to return the
> > correct viewport height? I have pasted the code that incorrectly
> > returns the height of the div instead of the viewport on pastie:
> > http://pastie.org/504692.
> >
> > Just add a doctype and you get the correct result:
> > Replace 
> > with
> >  >  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > http://www.w3.org/1999/xhtml";>
> >
> >
> > I hope to use Prototype with Ext JS in the future, but it seems that
> > Prototype recommends/requires the use of DOCTYPES while Ext JS
> > recommends against using DOCTYPES in order to avoid bugs in IE.
> >
> > - Paul K
> > >
> >
>
>
>
>
>
> >


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Why does document.viewport.getDimensions() not work without a DOCTYPE?

2009-06-08 Thread Walter Lee Davis

It's all over the docs on prototypejs.org and the unofficial wiki:  
Prototype expects valid (X)HTML. It wants a stable playing field --  
not a guessing game -- to start with. If you give it that bare  
minimum, then it makes your (programming) life much richer and  
sweeter. If you find a bug in Prototype, before you raise it here or  
elsewhere, validate the page it's operating on.

Walter

On Jun 8, 2009, at 2:07 PM, Alex McAuley wrote:

>
> This has been discussed many times before .. if i recall correctly its
> somehting to do with Quirksmode
>
> HTH
>
> Alex
> - Original Message -
> From: "kimbaudi" 
> To: "Prototype & script.aculo.us"  >
> Sent: Monday, June 08, 2009 5:58 PM
> Subject: [Proto-Scripty] Why does document.viewport.getDimensions()  
> not work
> without a DOCTYPE?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Why does document.viewport.getDimensions() not work without a DOCTYPE?

2009-06-08 Thread Paul Kim
I guess this mean that I must use DOCTYPES when using Prototype.  I was
expecting Prototype to work consistently whether or not there was a DOCTYPE
present.

- Paul

On Mon, Jun 8, 2009 at 11:07 AM, Alex McAuley <
webmas...@thecarmarketplace.com> wrote:

>
> This has been discussed many times before .. if i recall correctly its
> somehting to do with Quirksmode
>
> HTH
>
> Alex
> - Original Message -
> From: "kimbaudi" 
> To: "Prototype & script.aculo.us" <
> prototype-scriptaculous@googlegroups.com>
> Sent: Monday, June 08, 2009 5:58 PM
> Subject: [Proto-Scripty] Why does document.viewport.getDimensions() not
> work
> without a DOCTYPE?
>
>
> >
> > Hi, I have taken a look at the Prototype API and it says that
> > document.viewport.getDimensions() should return the size of the
> > viewport. I have created a simple page with a  with width of
> > 100px and height of 100px.  I am hoping to alert the height of the
> > browser window, but I get the height of the div. I didn't understand
> > why the height of the div got alerted instead of the browser window.
> > It appears that I needed to add a DOCTYPE in order for
> > document.viewport.getDimensions() to work properly. Can anybody
> > explain why the DOCTYPE is required for Prototype to return the
> > correct viewport height? I have pasted the code that incorrectly
> > returns the height of the div instead of the viewport on pastie:
> > http://pastie.org/504692.
> >
> > Just add a doctype and you get the correct result:
> > Replace 
> > with
> >  >  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > http://www.w3.org/1999/xhtml";>
> >
> >
> > I hope to use Prototype with Ext JS in the future, but it seems that
> > Prototype recommends/requires the use of DOCTYPES while Ext JS
> > recommends against using DOCTYPES in order to avoid bugs in IE.
> >
> > - Paul K
> > >
> >
>
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Why does document.viewport.getDimensions() not work without a DOCTYPE?

2009-06-08 Thread Alex McAuley

This has been discussed many times before .. if i recall correctly its 
somehting to do with Quirksmode

HTH

Alex
- Original Message - 
From: "kimbaudi" 
To: "Prototype & script.aculo.us" 
Sent: Monday, June 08, 2009 5:58 PM
Subject: [Proto-Scripty] Why does document.viewport.getDimensions() not work 
without a DOCTYPE?


>
> Hi, I have taken a look at the Prototype API and it says that
> document.viewport.getDimensions() should return the size of the
> viewport. I have created a simple page with a  with width of
> 100px and height of 100px.  I am hoping to alert the height of the
> browser window, but I get the height of the div. I didn't understand
> why the height of the div got alerted instead of the browser window.
> It appears that I needed to add a DOCTYPE in order for
> document.viewport.getDimensions() to work properly. Can anybody
> explain why the DOCTYPE is required for Prototype to return the
> correct viewport height? I have pasted the code that incorrectly
> returns the height of the div instead of the viewport on pastie:
> http://pastie.org/504692.
>
> Just add a doctype and you get the correct result:
> Replace 
> with
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml";>
>
>
> I hope to use Prototype with Ext JS in the future, but it seems that
> Prototype recommends/requires the use of DOCTYPES while Ext JS
> recommends against using DOCTYPES in order to avoid bugs in IE.
>
> - Paul K
> >
> 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---