Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8538775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:12:05+00:00 2026-06-11T11:12:05+00:00

I have some old code that I’m updating to work in firefox, and I’ve

  • 0

I have some old code that I’m updating to work in firefox, and I’ve run across a problem.

In the code, there’s a function that looks like this:

function tableEnter() {

     myLocation = event.srcElement;

}

This doesn’t work in firefox. I’ve researched this quite a bit, but most of the solutions I’ve found require an event to be passed to this function, and then act on the e parameter that was passed. …Unfortunately in the code that I’m updating, I’m not getting any parameters passed.

What’s the solution to making the event.srcElemet work in firefox, without any parameters being passed to my function?

Edit:

Okay, the question is becoming: How do i pass the event object to my tableEnter() function?

Here’s what the code is currently doing:

$(document).ready(function () {
    //make table rows
    //for every new table row...
    myRow.onmouseover = tableEnter; (this is probably a bad name. it should be like..rowEnter. But this is the way I found the code)
});

the question is now, how do i pass the event object into tableEnter() so that I can do the things suggested on the internet, and the answers below.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:12:06+00:00Added an answer on June 11, 2026 at 11:12 am

    I honestly can’t see why you would want to have access to the event object, without it being an argument of your handler. But, hey, that’s just me. Although no parameters are specified, FF and chrome just do as they please and pass the event object to the handler anyway. So:

    function tableEnter()
    {
        var evt = window.event || arguments[0];
        var src = evt.target || evt.srcElement;
    }
    

    And that’s it. Personally, I would advise you to do what the whole wide web is doing:

    function handler(e)
    {
        e = e || window.event;
        var target = e.target || e.srcElement;
    }
    

    Since you’re using FF, you shouldn’t try to diverge from any of the coding conventions or standards too much, however vague they might be. At least it’s better than no standards or conventions at all.


    In view of your update, just change your function definition to:

    function tableEnter(e)
    {
        //though in jQuery, I suspect e is allready X-browser-proof
        e = e || window.event;
        //just leave ^^this^^ line out, and check in IE: alert(typeof e);
        //if it alerts object, jQuery passed the event object for you
        var theRow = this;//<-- this points to the row that triggered the mouseover
        var jQRow = $(this);//gives you access to jQuery methods
    
        var target = e.target || e.srcElement;//<-- mainly of importance in delegation
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading through some old code at work, and have noticed that there are
I am updating some old code and I have a subclassed UIView (GraphView) that
so I’ve come across some old code that I have to replicate, but it
There is some old legacy vbscript code we have that needs some sort of
We have some old C code here that's built with nmake. Is there an
I have some old code that uses qsort to sort an MFC CArray of
I have some old code (an old but still maintained VB6 application) that from
We have some code kicking around that uses this old internal Sun package for
I have some old C# plugin code that was implemented strictly with Reflection. In
I've picked up some old code that I need to work with and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.