javascript - Windows Phone WebBrowser: right way to get document height -


in windows phone 8 app have webbrowser control (internet explorer 10). need total height of document loaded it.

i must use javascript (no jquery), i'm using code (extracted jquery source):

documentheight = math.max(             document.body['scrollheight'],             document.documentelement['scrollheight'],             document.body['offsetheight'],             document.documentelement['offsetheight'],             document.documentelement['clientheight']         ); 

with long page, get, example, 6000 pixels. check if result correct, manually scroll bottom of page , document.documentelement.scrolltop value.

in case value returned 11000 pixels, should right value of document height.

so why documentheight half of real value?

thank

solved.
trying height of document before dom ready event , reason value wrong.

one of possible solutions know when dom loaded described here: "javascript domready?"


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -