Does the dynapi.document.addEventListener work for a window resize?  The
initial programming requirement stated the use case of a window resize being
the event to trigger some function [1].  I tried the code below [2] but it
didn't seem to work.  Got the error in the Mozilla Javascript Console:
dynapi.document has no properties.  Not sure if I'm doing something wrong.

[1] Use case

> > i realized in my script i need to perform a function
> > call every time the
> > user resizes the window to update some display

[2] Code

<SCRIPT LANGUAGE="JavaScript" SRC="../../dynapi3x/src/dynapi.js">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">

dynapi.document.addEventListener({
    onresize : function ( e )
    {
        var o = e.getSource();

        // do some work here
        alert( 'window was resized!!' );
    }
})

</SCRIPT>


----- Original Message ----- 
From: "Raymond Irving" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 22, 2003 4:40 PM
Subject: Re: [Dynapi-Help] onresize hook .


>
> Use the onresize event listener:
>
> dynapi.document.addEventListener({
>    onresize : function(e){
>       var o = e.getSource();
>       // do some work here
>    }
> })
>
> --
> Raymond Irving
>
> --- George Ardeleanu <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >
> >
> > hello everyone ,
> >
> > i just started using the new dynapi 3.0 CVS version
> > a couple of days ago .
> > i realized in my script i need to perform a function
> > call every time the
> > user resizes the window to update some display
> > elements .  however , i cant
> > seem to find how to accomplish this .  Looking
> > through some the list's
> > archives i came across some emails how one can call
> > Dynapi.onresize =
> > function(...) {...};    i cant seem to personally
> > get this to work .  is
> > there a different way to accomplish this in DynAPI 3
> > ?
> >
> >
> > thanks .
> >
> > george .
> >
> >
> >
> >
> -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Dynapi-Help mailing list
> > [EMAIL PROTECTED]
> >
> https://lists.sourceforge.net/lists/listinfo/dynapi-help
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dynapi-help
>
>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to