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. Advertisements

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. DC Gringo
    Replies:
    5
    Views:
    655
    =?Utf-8?B?U3VyZXNo?=
    Mar 3, 2004
  2. Kyzer
    Replies:
    2
    Views:
    915
    Duane Hebert
    May 6, 2005
  3. StvB
    Replies:
    2
    Views:
    385
  4. Replies:
    1
    Views:
    960
    Damien
    Feb 22, 2007
  5. Mister B
    Replies:
    8
    Views:
    918
    Nick Keighley
    Aug 26, 2010
  6. DC Gringo

    passing a value to an event handler from dropdownlist

    DC Gringo, Mar 2, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    251
  7. Adi
    Replies:
    2
    Views:
    329
  8. Sean Dockery
    Replies:
    8
    Views:
    256
    Sean Dockery
    Jan 3, 2006
Loading...