..or just use Window.getWidth() (notice uppercase W).

On Feb 23, 2:20 am, Anatol <[email protected]> wrote:
> Hi,
>
> I added a few simple Mootools effects to a web page. All works well in
> Firefox, but (as expected) IE (tested in IE7) causes trouble for some
> but not all of the script.
>
> Here is a test page:http://dipl-o-matic.nugob.org/test-page
>
> The relevant code is:
> ----------------------------------
>
> //<![CDATA[
>     window.addEvent('domready', function() {
>         var scroll = new Scroller('timeline', { area:
> Math.round((window.getWidth() - 760) / 2), velocity: 0.1 });
>         scroll.start();
>
>         $('searchform').fade('out');
>
>         Element.implement({
>             ShowHide: function() {
>                 this.setStyle('display','block');
>                 this.fade('toggle');
>             }
>         });
>
>         var SlideInOut = new Fx.Slide('commentform', {
>             duration: 1000,
>             transition: Fx.Transitions.Pow.easeOut
>         });
>
>         SlideInOut.hide();
>
>         Element.implement({
>             Slide: function() {
>                 SlideInOut.toggle();
>             }
>         });
>
>     });
> //]]>
>
> ----------------------------------
>
> When I click on "post your comment" on the page a comment form should
> slide open/close. It works in Firefox but in IE7 I get the script
> error:
>
> ----------------------------------
> Line: 1
> Character: 1
> Code: 0
> Error Message: Object doesn't support this property or method
> URL:http://dipl-o-matic.nugob.org/test-page
> ----------------------------------
>
> The same happens when I click on 'search' at the bottom of the page
> which should fade in/out a search field. This also works in Firefox.
>
> I'm not sure why this happens. I checked many forum posts and tried a
> lot but to no avail. The HTML and CSS code seem to be standards
> conform.
>
> Another Mootools effect (the timeline at the bottom is a scroller)
> works fine and also the initial hiding of the comment form seems to
> work well.
>
> Any hints are much appreciated. To me the error message doesn't say
> very much.
>
> Cheers!
> Anatol

Reply via email to