[Javascript] looking for HACK for events

Roger Roelofs rer at datacompusa.com
Wed Oct 8 15:15:07 CDT 2003


Walter,

I saw a way to do this somewhere a while ago, but I haven't been able 
to find it. I vaguely remember it had something to do with getting the 
event(s) already attached to the object and adding one to that list.  
It may have used anonymous functions, or it may have used 
AddEventListener, I can't remember.


On Wednesday, October 8, 2003, at 03:45  PM, Walter Torres wrote:

> OK, lets take this...
>
> say you have a method defined in an external file...
>
>    <script src='./TextArea_status-bar.js'></script>
>
> and in that file I have a line...
>
>     document.myText.onKeyPress = doStatus   // I don't, works for 
> discussion
>
>
> now, I need to use another external method as well...
>
>    <script src='./TextArea_password.js'></script>
>
>     document.myText.onKeyPress = doPassword   // I don't, works for
> discussion
>
>
> The second will cancel the first.
>
> And since they are independent, don't know each other exists so I 
> really can
> to...
>
>    function doActions(){
>        doStatus();
>        doPassword();
>    }
>
> This is my quandary.
>
> How do I make the browser do what it can't do! ;)
>
> I thought of the doActions() concept. I just don't know how to tell it 
> to
> add (pick your method) to its command list.
>
> Does this help explain?
>
> Walter
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>




More information about the Javascript mailing list