How to get this height info? Impossible?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul

    How to get this height info? Impossible?

    Hi,
    I'm wondering if someone out there can help me overcome this quandary.
    I need to be able to calculate the height of the current page. I need to
    calculate the height of the page in pixels after all images and text have
    been displayed. This is the area that the visitor can 'scroll' up and down
    in.
    I have already calculated the height of the useable part of the browser
    using:
    document.body.c lientHeight

    Has anybody any ideas?
    Is this possible?

    Thank-you,

    Paul





  • Martin Honnen

    #2
    Re: How to get this height info? Impossible?



    Paul wrote:
    [color=blue]
    > Hi,
    > I'm wondering if someone out there can help me overcome this quandary.
    > I need to be able to calculate the height of the current page. I need to
    > calculate the height of the page in pixels after all images and text have
    > been displayed. This is the area that the visitor can 'scroll' up and down
    > in.
    > I have already calculated the height of the useable part of the browser
    > using:
    > document.body.c lientHeight
    >
    > Has anybody any ideas?
    > Is this possible?[/color]

    var docHeight;
    if (typeof document.height != 'undefined') {
    docHeight = document.height ;
    }
    else if (document.body && typeof document.body.s crollHeight !=
    'undefined') {
    docHeight = document.body.s crollHeight;
    }
    should work with NN4 and later and IE4 and later. Only problem is
    IE6/Win in standards compliant mode where you need
    document.docume ntElement.scrol lHeight
    so with some more checks
    var docHeight;
    if (typeof document.height != 'undefined') {
    docHeight = document.height ;
    }
    else if (document.compa tMode && document.compat Mode != 'BackCompat') {
    docHeight = document.docume ntElement.scrol lHeight;
    }
    else if (document.body && typeof document.body.s crollHeight !=
    'undefined') {
    docHeight = document.body.s crollHeight;
    }

    --

    Martin Honnen


    Comment

    • Paul

      #3
      Re: How to get this height info? Impossible?

      "Martin Honnen" <mahotrash@yaho o.de> wrote in message
      news:3f9a7850$1 @olaf.komtel.ne t...[color=blue]
      >
      >
      > Paul wrote:
      >[color=green]
      > > Hi,
      > > I'm wondering if someone out there can help me overcome this[/color][/color]
      quandary.[color=blue][color=green]
      > > I need to be able to calculate the height of the current page. I[/color][/color]
      need to[color=blue][color=green]
      > > calculate the height of the page in pixels after all images and text[/color][/color]
      have[color=blue][color=green]
      > > been displayed. This is the area that the visitor can 'scroll' up and[/color][/color]
      down[color=blue][color=green]
      > > in.
      > > I have already calculated the height of the useable part of the[/color][/color]
      browser[color=blue][color=green]
      > > using:
      > > document.body.c lientHeight
      > >
      > > Has anybody any ideas?
      > > Is this possible?[/color]
      >
      > var docHeight;
      > if (typeof document.height != 'undefined') {
      > docHeight = document.height ;
      > }
      > else if (document.body && typeof document.body.s crollHeight !=
      > 'undefined') {
      > docHeight = document.body.s crollHeight;
      > }
      > should work with NN4 and later and IE4 and later. Only problem is
      > IE6/Win in standards compliant mode where you need
      > document.docume ntElement.scrol lHeight
      > so with some more checks
      > var docHeight;
      > if (typeof document.height != 'undefined') {
      > docHeight = document.height ;
      > }
      > else if (document.compa tMode && document.compat Mode != 'BackCompat') {
      > docHeight = document.docume ntElement.scrol lHeight;
      > }
      > else if (document.body && typeof document.body.s crollHeight !=
      > 'undefined') {
      > docHeight = document.body.s crollHeight;
      > }
      >
      > --
      >
      > Martin Honnen
      > http://JavaScript.FAQTs.com/
      >[/color]

      Thanks for your suggestions but these methods aren't returning the actual
      height of the page (the 'scrollable' height)

      I know can use object.scrollHe ight to retrieve the scrolling height of the
      object:



      But when I use:

      document.write( "document.body. scrollHeight is " +
      document.body.s crollHeight);

      It doesn't return the correct value.

      Please see\try the html at the end of this post where I try many different
      methods to get the value I want.

      Thanks for any suggestions off anyone,

      Paul
      ----------

      <html>
      <head>
      <title>Exampl e</title>
      <SCRIPT TYPE="text/javascript">
      <!--
      function redo()
      {
      window.location .reload();
      }
      window.onresize = redo;
      //-->
      </SCRIPT>
      <body>
      <SCRIPT TYPE="text/javascript">
      <!--
      document.write( "document.body. scrollHeight is " +
      document.body.s crollHeight);
      document.write( "<br>document.b ody.clientHeigh t is " +
      document.body.c lientHeight);
      document.write( "<br>document.b ody.offsetHeigh t is " +
      document.body.o ffsetHeight);
      document.write( "<br>document.b ody.clientHeigh t is " +
      document.body.c lientHeight);
      document.write( "<br>document.b ody.scrollHeigh t is " +
      document.body.s crollHeight);
      document.write( "<br>document.d ocumentElement. scrollHeight is " +
      document.docume ntElement.scrol lHeight);
      document.write( "<br>document.h eight is " + document.height );
      document.write( "<br>window.dia logHeight is " + window.dialogHe ight);
      document.write( "<br>screen.hei ght is " + screen.height);
      document.write( "<br>document.s crollHeight is " + document.scroll Height);
      var docHeight1;
      if (typeof document.height != 'undefined') {
      docHeight1 = document.height ;
      }
      else if (document.body && typeof document.body.s crollHeight !=
      'undefined') {
      docHeight1 = document.body.s crollHeight;
      }
      document.write( "<br><br>docHei ght1 is " + docHeight1);
      var docHeight2;
      if (typeof document.height != 'undefined') {
      docHeight2 = document.height ;
      }
      else if (document.compa tMode && document.compat Mode != 'BackCompat') {
      docHeight2 = document.docume ntElement.scrol lHeight;
      }
      else if (document.body && typeof document.body.s crollHeight !=
      'undefined') {
      docHeight2 = document.body.s crollHeight;
      }
      document.write( "<br>docHei ght2 is " + docHeight2);
      //-->
      </SCRIPT>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      <p>Text to make the page longer in vertical height. Need to work out exactly
      how long this is.</p>
      </body>
      </html>


      Comment

      • Martin Honnen

        #4
        Re: How to get this height info? Impossible?



        Paul wrote:
        [color=blue]
        > "Martin Honnen" <mahotrash@yaho o.de> wrote in message
        > news:3f9a7850$1 @olaf.komtel.ne t...
        >[color=green]
        >>
        >>Paul wrote:
        >>
        >>[color=darkred]
        >>>Hi,
        >>> I'm wondering if someone out there can help me overcome this[/color][/color]
        >
        > quandary.
        >[color=green][color=darkred]
        >>> I need to be able to calculate the height of the current page. I[/color][/color]
        >
        > need to
        >[color=green][color=darkred]
        >>>calculate the height of the page in pixels after all images and text[/color][/color]
        >
        > have
        >[color=green][color=darkred]
        >>>been displayed. This is the area that the visitor can 'scroll' up and[/color][/color]
        >
        > down
        >[color=green][color=darkred]
        >>>in.
        >>> I have already calculated the height of the useable part of the[/color][/color]
        >
        > browser
        >[color=green][color=darkred]
        >>>using:
        >>>document.bod y.clientHeight
        >>>
        >>> Has anybody any ideas?
        >>> Is this possible?[/color]
        >>
        >> var docHeight;
        >> if (typeof document.height != 'undefined') {
        >> docHeight = document.height ;
        >> }
        >> else if (document.body && typeof document.body.s crollHeight !=
        >>'undefined' ) {
        >> docHeight = document.body.s crollHeight;
        >> }
        >>should work with NN4 and later and IE4 and later. Only problem is
        >>IE6/Win in standards compliant mode where you need
        >> document.docume ntElement.scrol lHeight
        >>so with some more checks
        >> var docHeight;
        >> if (typeof document.height != 'undefined') {
        >> docHeight = document.height ;
        >> }
        >> else if (document.compa tMode && document.compat Mode != 'BackCompat') {
        >> docHeight = document.docume ntElement.scrol lHeight;
        >> }
        >> else if (document.body && typeof document.body.s crollHeight !=
        >>'undefined' ) {
        >> docHeight = document.body.s crollHeight;
        >> }
        >>[/color]
        >
        > Thanks for your suggestions but these methods aren't returning the actual
        > height of the page (the 'scrollable' height)
        >
        > I know can use object.scrollHe ight to retrieve the scrolling height of the
        > object:
        >
        > http://www.msdn.microsoft.com/librar...entid=28000441
        >
        > But when I use:
        >
        > document.write( "document.body. scrollHeight is " +
        > document.body.s crollHeight);
        >
        > It doesn't return the correct value.
        >
        > Please see\try the html at the end of this post where I try many different
        > methods to get the value I want.
        >
        > Thanks for any suggestions off anyone,
        >
        > Paul
        > ----------
        >
        > <html>
        > <head>
        > <title>Exampl e</title>
        > <SCRIPT TYPE="text/javascript">
        > <!--
        > function redo()
        > {
        > window.location .reload();
        > }
        > window.onresize = redo;
        > //-->
        > </SCRIPT>
        > <body>
        > <SCRIPT TYPE="text/javascript">
        > <!--
        > document.write( "document.body. scrollHeight is " +
        > document.body.s crollHeight);
        > document.write( "<br>document.b ody.clientHeigh t is " +
        > document.body.c lientHeight);
        > document.write( "<br>document.b ody.offsetHeigh t is " +
        > document.body.o ffsetHeight);
        > document.write( "<br>document.b ody.clientHeigh t is " +
        > document.body.c lientHeight);
        > document.write( "<br>document.b ody.scrollHeigh t is " +
        > document.body.s crollHeight);
        > document.write( "<br>document.d ocumentElement. scrollHeight is " +
        > document.docume ntElement.scrol lHeight);
        > document.write( "<br>document.h eight is " + document.height );
        > document.write( "<br>window.dia logHeight is " + window.dialogHe ight);
        > document.write( "<br>screen.hei ght is " + screen.height);
        > document.write( "<br>document.s crollHeight is " + document.scroll Height);
        > var docHeight1;
        > if (typeof document.height != 'undefined') {
        > docHeight1 = document.height ;
        > }
        > else if (document.body && typeof document.body.s crollHeight !=
        > 'undefined') {
        > docHeight1 = document.body.s crollHeight;
        > }
        > document.write( "<br><br>docHei ght1 is " + docHeight1);
        > var docHeight2;
        > if (typeof document.height != 'undefined') {
        > docHeight2 = document.height ;
        > }
        > else if (document.compa tMode && document.compat Mode != 'BackCompat') {
        > docHeight2 = document.docume ntElement.scrol lHeight;
        > }
        > else if (document.body && typeof document.body.s crollHeight !=
        > 'undefined') {
        > docHeight2 = document.body.s crollHeight;
        > }
        > document.write( "<br>docHei ght2 is " + docHeight2);[/color]

        Well, how do you suppose the browser can return the height of the
        complete page here at this point where the complete page has not yet
        been loaded. I still think you are looking for the value I suggested but
        of course you should only read the value after the page has been loaded
        and not while it loads.



        --

        Martin Honnen


        Comment

        • Paul

          #5
          Re: How to get this height info? Impossible?


          "Martin Honnen" <mahotrash@yaho o.de> wrote in message
          news:3f9bc5a3$1 @olaf.komtel.ne t...[color=blue]
          >
          >
          > Paul wrote:
          >[color=green]
          > > "Martin Honnen" <mahotrash@yaho o.de> wrote in message
          > > news:3f9a7850$1 @olaf.komtel.ne t...
          > >[color=darkred]
          > >>
          > >>Paul wrote:
          > >>
          > >>
          > >>>Hi,
          > >>> I'm wondering if someone out there can help me overcome this[/color]
          > >
          > > quandary.
          > >[color=darkred]
          > >>> I need to be able to calculate the height of the current page. I[/color]
          > >
          > > need to
          > >[color=darkred]
          > >>>calculate the height of the page in pixels after all images and text[/color]
          > >
          > > have
          > >[color=darkred]
          > >>>been displayed. This is the area that the visitor can 'scroll' up and[/color]
          > >
          > > down
          > >[color=darkred]
          > >>>in.
          > >>> I have already calculated the height of the useable part of the[/color]
          > >
          > > browser
          > >[color=darkred]
          > >>>using:
          > >>>document.bod y.clientHeight
          > >>>
          > >>> Has anybody any ideas?
          > >>> Is this possible?
          > >>
          > >> var docHeight;
          > >> if (typeof document.height != 'undefined') {
          > >> docHeight = document.height ;
          > >> }
          > >> else if (document.body && typeof document.body.s crollHeight !=
          > >>'undefined' ) {
          > >> docHeight = document.body.s crollHeight;
          > >> }
          > >>should work with NN4 and later and IE4 and later. Only problem is
          > >>IE6/Win in standards compliant mode where you need
          > >> document.docume ntElement.scrol lHeight
          > >>so with some more checks
          > >> var docHeight;
          > >> if (typeof document.height != 'undefined') {
          > >> docHeight = document.height ;
          > >> }
          > >> else if (document.compa tMode && document.compat Mode != 'BackCompat')[/color][/color][/color]
          {[color=blue][color=green][color=darkred]
          > >> docHeight = document.docume ntElement.scrol lHeight;
          > >> }
          > >> else if (document.body && typeof document.body.s crollHeight !=
          > >>'undefined' ) {
          > >> docHeight = document.body.s crollHeight;
          > >> }
          > >>[/color]
          > >
          > > Thanks for your suggestions but these methods aren't returning the[/color][/color]
          actual[color=blue][color=green]
          > > height of the page (the 'scrollable' height)
          > >
          > > I know can use object.scrollHe ight to retrieve the scrolling height of[/color][/color]
          the[color=blue][color=green]
          > > object:
          > >
          > >[/color][/color]
          http://www.msdn.microsoft.com/librar...entid=28000441[color=blue][color=green]
          > >
          > > But when I use:
          > >
          > > document.write( "document.body. scrollHeight is " +
          > > document.body.s crollHeight);
          > >
          > > It doesn't return the correct value.
          > >
          > > Please see\try the html at the end of this post where I try many[/color][/color]
          different[color=blue][color=green]
          > > methods to get the value I want.
          > >
          > > Thanks for any suggestions off anyone,
          > >
          > > Paul
          > > ----------
          > >
          > > <html>
          > > <head>
          > > <title>Exampl e</title>
          > > <SCRIPT TYPE="text/javascript">
          > > <!--
          > > function redo()
          > > {
          > > window.location .reload();
          > > }
          > > window.onresize = redo;
          > > //-->
          > > </SCRIPT>
          > > <body>
          > > <SCRIPT TYPE="text/javascript">
          > > <!--
          > > document.write( "document.body. scrollHeight is " +
          > > document.body.s crollHeight);
          > > document.write( "<br>document.b ody.clientHeigh t is " +
          > > document.body.c lientHeight);
          > > document.write( "<br>document.b ody.offsetHeigh t is " +
          > > document.body.o ffsetHeight);
          > > document.write( "<br>document.b ody.clientHeigh t is " +
          > > document.body.c lientHeight);
          > > document.write( "<br>document.b ody.scrollHeigh t is " +
          > > document.body.s crollHeight);
          > > document.write( "<br>document.d ocumentElement. scrollHeight is " +
          > > document.docume ntElement.scrol lHeight);
          > > document.write( "<br>document.h eight is " + document.height );
          > > document.write( "<br>window.dia logHeight is " + window.dialogHe ight);
          > > document.write( "<br>screen.hei ght is " + screen.height);
          > > document.write( "<br>document.s crollHeight is " + document.scroll Height);
          > > var docHeight1;
          > > if (typeof document.height != 'undefined') {
          > > docHeight1 = document.height ;
          > > }
          > > else if (document.body && typeof document.body.s crollHeight !=
          > > 'undefined') {
          > > docHeight1 = document.body.s crollHeight;
          > > }
          > > document.write( "<br><br>docHei ght1 is " + docHeight1);
          > > var docHeight2;
          > > if (typeof document.height != 'undefined') {
          > > docHeight2 = document.height ;
          > > }
          > > else if (document.compa tMode && document.compat Mode != 'BackCompat') {
          > > docHeight2 = document.docume ntElement.scrol lHeight;
          > > }
          > > else if (document.body && typeof document.body.s crollHeight !=
          > > 'undefined') {
          > > docHeight2 = document.body.s crollHeight;
          > > }
          > > document.write( "<br>docHei ght2 is " + docHeight2);[/color]
          >
          > Well, how do you suppose the browser can return the height of the
          > complete page here at this point where the complete page has not yet
          > been loaded. I still think you are looking for the value I suggested but
          > of course you should only read the value after the page has been loaded
          > and not while it loads.
          >
          >
          >
          > --
          >
          > Martin Honnen
          > http://JavaScript.FAQTs.com/
          >[/color]

          A good point, thanks.

          When would be the best time to run this code? Considering that even
          though the page has fully loaded, the images upon the page may not have been
          loaded yet, and the height of the 'scrollable' size may change again.

          A time delay would be undesirable.

          This is what I have tried so far:

          <html>
          <head>
          <title>Tamari sh Art</title>
          <SCRIPT TYPE="text/javascript">
          <!--
          function pageHeight()
          {
          var docHeight;
          if (typeof document.height != 'undefined') {
          docHeight = document.height ;
          }
          else if (document.compa tMode && document.compat Mode != 'BackCompat') {
          docHeight = document.docume ntElement.scrol lHeight;
          }
          else if (document.body && typeof document.body.s crollHeight !=
          'undefined') {
          docHeight = document.body.s crollHeight;
          }
          }
          window.onload = pageHeight;
          //-->
          </SCRIPT>
          </head>
          <body>
          <SCRIPT TYPE="text/javascript">
          <!--
          document.write( "Scrollable page height is " + docHeight);
          //-->
          </SCRIPT>
          </body>
          </html>

          However, when I open the page, I get an error:
          'docHeight' is undefined

          Can you help me iron out these last few creases?

          Thank-you very much for your help,

          Paul


          Comment

          Working...