From: David D. K. <ddk...@ki...> - 2005-07-15 15:03:17
|
It would appear that there are some JavaScript functions/features =20 that are enabled for Mozilla but aren't enabled for MSIE. OR your =20 JavaScript has two different execution paths (one for Mozilla, one =20 for MSIE), and all the functions/features are present for the Mozilla =20= path, but not for the MSIE path. I would recommend filing a bug on SourceForge, and writing a reduced =20 test case for the problem. Posting the JavaScript here would also =20 help in diagnosing the issue. Dave On Jul 7, 2005, at 9:07 AM, Zbigniew Kominek wrote: > I'have a little problem :) > Part of my web page is written in JavaScript. There are implemented > couple methods. One of those look as follows: > > function getWidth() { > var width=3Dwindow.innerWidth; > if (width=3D=3Dnull) > width=3Ddocument.body.offsetWidth; > return w; > } > > When I try to test that page using settings for Mozilla: > > final WebClient webClient =3D new = WebClient(BrowserVersion.MOZILLA_1_0); > > everythigs worked ok, the property window.innerWidth returned proper > value of window width, but problem arrived when I switched > configuration to: > > final WebClient webClient =3D new > WebClient(BrowserVersion.INTERNET_EXPLORER_6_0); > > Now document.body.offsetWidth returns nothing. I tried to add > another property in JavaScriptConfiguration.xml file: > > <property name=3D"clientWidth" readable=3D"true" writable=3D"false"/> > <property name=3D"clientHeight" readable=3D"true" writable=3D"false"/> > > and I change offsetWidth to clientWidth in getWidth function, but > this solution doesn't solve the problem. Is there some possibility > to get size of the document (or window) in such a way, that hmtlunit > works with it ok in both (Mozilla and IE) situations? Or maybe > htmlunit can be configured in some other way? > > Best regards > Zbyhoo > > ---------------------------------------------------- > Zadbaj o bezpieczne wakacje nad wod=C4=85! > W=C5=82=C4=85cz si=C4=99 w Bezpieczne lato z NIVEA i WOPR > http://klik.wp.pl/?adr=3Dwww.sport.wp.pl%2Fnivea-wopr.html&sid=3D427 |