Link to home
Start Free TrialLog in
Avatar of tyuret
tyuret

asked on

IE contentDocument.documentElement problem

Hi,

I am trying to write a cross browser js code

The below line gives "Object doesn't support this property or method" error on an IE browser
while it does not give any error on another IE . Both has exactly the same version.

if (iframeid.contentDocument) var ht0=iframeid.contentDocument.documentElement.scrollHeight;

any idea?
Thank you


ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hielo
Try:
iframeid.contentDocument.document.scrollHeight;

OR:
iframeid.contentWindow.document.scrollHeight;

refer to:
http://stackoverflow.com/questions/1477547/getelementbyid-contentdocument-error-in-ie
Avatar of tyuret
tyuret

ASKER

thank you