Passing parameter in an event handler under Mozilla

Discussion in 'Javascript' started by Paul Cotney, Jul 11, 2003.

  1. Paul Cotney

    Paul Cotney Guest

    I have been changing one of our IE specific applications to run under
    Mozilla and have had little trouble up til now. I have figured out how
    to handle events except when I need to pass a parameter to the event
    handler that is not the event itself. My failed attempts are listed
    below:

    function changeto(e,highlightcolor){
    var source = e.srcElement;
    <snip>
    }

    called with:
    onmouseout="changeback(this.event,'white')"
    e has no properties

    called with
    onmouseout="changeback(event,'white')"
    source has no properties

    of course:
    function changeto(e){
    if (!e)
    e = window.event;
    var source = e.srcElement;
    var colormove = white;
    <snip>
    }
    called with
    onmouseout="changeback"

    works fine in Mozilla

    Any suggestions would be appreciated...
     
    Paul Cotney, Jul 11, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kyzer
    Replies:
    2
    Views:
    787
    Duane Hebert
    May 6, 2005
  2. Replies:
    1
    Views:
    755
    Damien
    Feb 22, 2007
  3. Mister B
    Replies:
    8
    Views:
    604
    Nick Keighley
    Aug 26, 2010
  4. Adi
    Replies:
    2
    Views:
    205
  5. Sean Dockery
    Replies:
    8
    Views:
    160
    Sean Dockery
    Jan 3, 2006
Loading...

Share This Page