[Javascript] looking for HACK for events

BEKIM BACAJ trojani2000 at hotmail.com
Wed Oct 8 14:51:17 CDT 2003


Fine explication, but I still stand blurred.

So you'd like to have them both (these scripts), working in the same page.

That's good.

Thank's to the event designers, the on-key user action fires three events: 
onKeypress; onKeydown; onKeyup.
[sorry but I don't recall if the onKeyUp enterfers with the onKeypress, but 
if it don't you can use them toghether, one for the first, the other for the 
second script]

or the other way, - wrap them.

function statusDisplay(){
            statusFunct();  textAreaFunct()
                                }
onkeypress=statusDisplay

and U-re done

Both get called and both get executed simul



OK

>From: "Walter Torres" <walter at torres.ws>
>Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
>To: "[JavaScript List]" <javascript at LaTech.edu>
>Subject: RE: [Javascript] looking for HACK for events
>Date: Wed, 8 Oct 2003 12:27:52 -0500
>
> > -----Original Message-----
> > From: javascript-bounces at LaTech.edu
> > [mailto:javascript-bounces at LaTech.edu]On Behalf Of Chris Tifer
> > Sent: Wednesday, October 08, 2003 11:22 AM
> > To: [JavaScript List]
> > Subject: Re: [Javascript] looking for HACK for events
> >
> >
> > Am you overlooking the obvious answer of functions?  Could you
> > explain a little more what you're asking for as it seems so
> > simple and I know you've come up with some more complex stuff
> > in the past that this can't be stumping you.
>
>OK, I hope I can explain well enough...
>
>I have a method that attaches a status bar to a TEXT, PASSWORD and TEXTAREA
>Form Elements. When you enter characters, the bar advances.
>
>When custom attributes are added to these types of Form elements, my method
>attaches itself to these Elements via Key Events. Other Forms Elements of
>the same kind are ignored. So you can choose which uses the bar by these
>custom attributes.
>
>All works (just sorting out CSS display issues on Mozilla, but that's a
>different issue).
>
>I have another method that makes a TEXTAREA Form Element behave as the
>PASSWORD element does.
>
>Also attaches itself to the Element via Key Events. Same as the status bar
>method, it looks for a custom attribute, if not there, it is not attached.
>
>The idea of the custom attributes is that a web designer (who does not 
>know,
>does not want to know JS coding) can use these features without opening the
>code. Sort of a black box, if you will.
>
>Now, separately, these work fine.
>
>But if I place them on the same page, which ever is loaded first does not
>fire.
>
>The second is overriding the Key Event attachment.
>
>My goal is to have some way of having these work together, but not coded
>together.
>
>I would like to do this...
>
>     <script src='./TextArea_status-bar.js'></script>
>     <script src='./TextArea_password.js'></script>
>
>And all would be right with the world.
>
>I guess I'm looking for some way to "register" multiple methods to the same
>event. Even if it means I need a new method as a per cursor to all this.
>
>Thanks for your ideas.
>
>Walter
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail




More information about the Javascript mailing list