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 9115403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:25:25+00:00 2026-06-17T04:25:25+00:00

I have written the below code and it is working in all modern browsers

  • 0

I have written the below code and it is working in all modern browsers except in <IE9

<script>
    function eventH(event) {
        alert(this);
    }
</script>

<img src="h300.png" onload="eventH(arguments[0]);"/>

It fires event handler, but event is undefined and this value is parent object. Why?

Does IE handle this differently or I am wrong somewhere in understanding this?

  • 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-17T04:25:26+00:00Added an answer on June 17, 2026 at 4:25 am

    Internet Explorer 8 and below do not implement the W3C event model. For IE, what you need might instead be part of window.event.

    QuirksMode gives a good set of examples of how to write event-handling code compatible with both modern browsers and old IE versions.

    Also note that when you call a JavaScript function without using dot notation, the global window object is this (except in ES5 strict mode, in which accessing this is not allowed in this case). Instead, you can pass this to your function as an argument.

    However, it may be better to just attach your event handler using .addEventListener() (W3C model) or .attachEvent() (Microsoft model) instead of specifying it in the HTML. Then, this will work as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have written below code function unique(th){ var obj = {}; for(var i
I am trying to fetch wcf service from jquery. I have written below code
I have written grammar for a language (sample code below) //this is a procedure
I have written a very simple WCF service, that worked fine (code below), then
I have written a MapReduce program, code is below: import java.io.IOException; import java.util.Iterator; import
I have written a function below: void trans(double x,double y,double theta,double m,double n) {
I have written a pgsql function along the lines of what's shown below. How
Below i have written code of a soap webservice in php with its client,It
I have written this code. Its not working but with this you should get
So I am working on Problem 31 . I have written the following function

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.